无法使用本机取消链接来取消链接库

时间:2019-10-30 15:57:40

标签: android react-native react-native-linking

1。。我取消链接图书馆,因为我正在使用React Native >v0.59自动链接图书馆。

(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。。上面显示该库已成功取消链接,但是当我尝试为android构建时,它声称该库已链接:

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")

其他软件包也发生了这种情况,我认为它与react-native-community/async-storage库无关。是否有重置或解决此问题的程序?

1 个答案:

答案 0 :(得分:0)

删除iOS和android文件夹,然后运行

react-native eject

然后建立

react-native run-android