我在运行项目时发现一个错误,我尝试寻找很多示例但都失败了,这是错误的详细信息:
D:\myApp\android\app\src\debug\AndroidManifest.xml:22:18-91 Error:
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:7:5-117 to override.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
> Task :app:processDebugManifest FAILED
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:7:5-117 to override.
请任何人帮助我解决这个问题。
谢谢
原文由 Frank Andrew 发布,翻译遵循 CC BY-SA 4.0 许可协议
我有更多依赖 gcm 的库(除了 deviceinfo),所以我用它来解决问题: https ://stackoverflow.com/a/56648987/8306924