gpt4 book ai didi

node.js - Nativescript 构建失败并出现错误 "Manifest merger failed "

转载 作者:太空宇宙 更新时间:2023-11-03 22:49:05 26 4
gpt4 key购买 nike

我正在尝试使用命令“tns debug android”调试我的 Nativescript 应用程序,但构建过程始终失败。错误堆栈跟踪:

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.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:17:2-42:16 to override.FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:processDebugManifest'. Manifest merger failed : 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.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:17:2-42:16 to override.

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 15s Unable to apply changes on device: 18d388bb7cf4. Error is: Command gradlew.bat failed with exit code 1.

我已按照 Nativescript docs 中描述的步骤进行操作设置我的开发环境。

第 1 步:npm install -g nativescript

第 2 步:@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-objectnet.webclient).DownloadString(' https://www.nativescript.org/setup/win '))"

第 3 步:npm 安装

第 4 步:tns 调试 android

我已经尝试过thisthis too但运气不佳。

我还尝试删除/卸载包括 Nativescript 在内的所有内容,并从头开始,但它也不起作用。

请指导我应该如何解决该错误。

最佳答案

我今天遇到了同样的问题,我用本指南解决了https://www.nativescript.org/blog/support-for-androidx-in-nativescript在“问:我是 NativeScript 应用程序开发人员。此 AndroidX 迁移对我有何影响?”部分

按照以下步骤操作:

  • npm 安装 tns-core-modules@androidx --save-exact
  • tns 平台添加 android@androidx

然后尝试构建您的项目

关于node.js - Nativescript 构建失败并出现错误 "Manifest merger failed ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56686814/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com