Unable to unlink library with react-native unlink

1.1k Views Asked by At

1. I unlinked a library because I am using React Native >v0.59 that links libraries automatically.

(base) Somedude@Programmers-Machine-4:~/CrossPlatformProjects/ReactNative/someapp$ react-native unlink @react-native-community/async-storage
    info Unlinking "@react-native-community/async-storage" iOS dependency
    info iOS module "@react-native-community/async-storage" has been successfully unlinked
    info Unlinking "@react-native-community/async-storage" Android dependency
    info Android module "@react-native-community/async-storage" has been successfully unlinked
    (base) Somedude@Programmers-Machine-4:~/CrossPlatformProjects/ReactNative/spotsrn$ react-native run-android

2. Above it shows that the library has been successfully unlinked, but then when I try to build for android it claims the library is linked:

error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually: 
  - @react-native-community/async-storage (to unlink run: "react-native unlink @react-native-community/async-storage")
  - react-native-fbsdk (to unlink run: "react-native unlink react-native-fbsdk")
  - react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")

This has happened to other packages as well and I don't think it is related to the react-native-community/async-storage library. Is there a process to reset/resolve this?

1

There are 1 best solutions below

1
On

Delete the iOS and android folder then run

react-native eject

Then build

react-native run-android