我试图将本机版本从0.59.8更新到最新版本。但是当我尝试运行应用程序
时出现以下错误warn The following packages use deprecated "rnpm" config that will stop working from next release:
- native-base: https://github.com/GeekyAnts/NativeBase#readme
- react-native-code-push: https://microsoft.github.io/code-push
- react-native-maps: https://github.com/react-native-community/react-native-maps#readme
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
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-code-push (to unlink run: "react-native unlink react-native-code-push")
- react-native-geolocation-service (to unlink run: "react-native unlink react-native-geolocation-service")
- react-native-gesture-handler (to unlink run: "react-native unlink react-native-gesture-handler")
- react-native-maps (to unlink run: "react-native unlink react-native-maps")
- react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
在react-native run-android Terminal中,错误显示如下
Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:7:5-117 to override.
失败:构建失败,并出现异常。
出了什么问题: 任务':app:processDebugManifest'的执行失败。
清单合并失败:来自[com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91的属性application @ appComponentFactory value =(android.support.v4.app.CoreComponentFactory) 也出现在[androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value =(androidx.core.app.CoreComponentFactory)。 建议:在AndroidManifest.xml:7:5-117的元素上添加'tools:replace =“ android:appComponentFactory”'以进行覆盖。
尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获取完整的见解。
在2秒钟内失败
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:13)
我尝试更新依赖项。取消依赖关系的链接,然后再次链接它们,没有任何帮助
答案 0 :(得分:0)
从本地软件包中删除rnpm。该文件位于/node_modules/native-base/package.json
关注此链接
https://github.com/GeekyAnts/NativeBase/pull/2749/commits/0bf3d4362116a17f9a4e311789a1a58dc6d98f37
答案 1 :(得分:0)
帮助下一个有此问题的人。
运行以下命令以“ rnpm”删除软件包:
纱线去除react-native-update-gradle
在以下命令之后更新依赖关系:
纱线升级
工作了至少
答案 2 :(得分:0)
删除node-modules
并运行yarn