繁体   English   中英

Ionic 3 Android失败Build Manifest合并失败

[英]Ionic 3 Android Failed Build Manifest merger failed

我检查了许多帖子和Github问题,但仍然无法解决此构建错误:

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 <application> element at AndroidManifest.xml:5:5-36:19 to override.

我已经尝试从这篇文章以及这些文章中找到的其他AndroidX解决方案中添加cordova-android-support-gradle-release和其他解决方案:

https://github.com/material-components/material-components-android/issues/193

Android Material和Appcompat Manifest合并失败

无济于事。

我什至尝试将Android Studio更新到最新版本,并尝试从重构菜单中选择“ Migrate to AndroidX选项。

最后,我还尝试了将Cordova android@8@7.4.1都用于上述两种版本。

我会尝试按照上述Github链接中的建议将以下内容添加到gradle.properties文件中,但是在此Ionic项目中我没有其中之一:

android.useAndroidX=true
android.enableJetifier=true

作为错误状态,我在AndroidManifest.xml的应用程序标签中添加了tools:replace="android:appComponentFactory"

BUILD FAILED in 4s
/Users/xxxxxxxxxx/Development/xxxxxxxxxx/mobile/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/xxxxxxxxxx/Development/xxxxxxxxxx/mobile/platforms/android/app/src/main/AndroidManifest.xml:5:5-36:19 Error:
        tools:replace specified at line:5 for attribute android:appComponentFactory, but no new value specified
/Users/simontaylor/Development/Rehab Guru/mobile/platforms/android/app/src/main/AndroidManifest.xml Error:
        Validation failed, exiting

请将此行写入应用程序标记中的AndroidManifest.xml文件:tools:replace =“ android:appComponentFactory”

在AndroidManifest文件的application标签中添加以下一行

tools:node="replace"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM