我最近不得不重新开始为React Native项目的Android Studio文件进行备份。但是,当我这样做时,我所有的模块都变得未链接。
File Directory Without Linked Modules(imgur链接)
每个模块应该在这里有一个文件夹,但是没有,因此应用程序也不会运行。
我尝试运行react-native link
重新链接所有链接,但是它说每个模块都已链接。然后,我尝试手动取消链接并重新链接模块,但这没有帮助。
C:\Users\Jacob\kalleo\kalleo-master\kalleo-native>react-native link
Scanning 810 folders for symlinks in C:\Users\Jacob\kalleo\kalleo-master\kalleo-native\node_modules (99ms)
rnpm-install info Android module react-native-appsee is already linked
rnpm-install info iOS module react-native-appsee is already linked
rnpm-install info Android module react-native-config is already linked
rnpm-install info iOS module react-native-config is already linked
rnpm-install info Android module react-native-contacts is already linked
rnpm-install info iOS module react-native-contacts is already linked
rnpm-install info Android module react-native-fbsdk is already linked
rnpm-install info iOS module react-native-fbsdk is already linked
rnpm-install info Android module react-native-firebase-analytics is already linked
rnpm-install info iOS module react-native-firebase-analytics is already linked
rnpm-install info Android module react-native-immediate-phone-call is already linked
rnpm-install info iOS module react-native-immediate-phone-call is already linked
rnpm-install info iOS module react-native-permissions is already linked
rnpm-install info Android module react-native-push-notification is already linked
rnpm-install info iOS module react-native-segment-io-analytics is already linked
rnpm-install info Android module react-native-vector-icons is already linked
rnpm-install info iOS module react-native-vector-icons is already linked
rnpm-install info Linking assets to ios project
rnpm-install info Linking assets to android project
rnpm-install info Assets have been successfully linked to your project
我希望它们在通过备份重建Android文件后能够重新链接,但它们不会。
答案 0 :(得分:0)
您可能应该在Android Studio中进行File > Sync Project with Gradle Files
。