升级到react-native 0.60之后......我被警告说我应该取消手动链接的所有第3方库(因为RN现在通过自动链接来处理它)。
但是当我运行 react-native unlink <depedency>
时我收到错误 Something went wrong while unlinking. Reason Expected [\n\r] but end of input found
有什么想法吗?
最佳答案
原因是,在您的一个文件中,文件末尾的空白行丢失了。
请检查以下文件中是否有此空行:
- ios/[项目].xcodeproj/project.pbxproj
- android/settings.gradle
您还可以像这样手动取消链接模块:
打开android/settings.gradle
,删除include和project行
清理后,文件应如下所示:
rootProject.name = 'MyBeautifullApp'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
关于react-native - React Native - 运行命令时出现错误 "react-native unlink",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59099980/