Java 错误崩溃实现';支持:appcompat-v7:28.0.0';
这是我的依赖项(模块:app) 在添加实现“com.google.android.gms:play services:12.0.1”后,同步模块:实现“com.android.support:appcompat-v7:28.0.0”上的应用程序始终出错 错误:Java 错误崩溃实现';支持:appcompat-v7:28.0.0';,java,android,android-studio,Java,Android,Android Studio,这是我的依赖项(模块:app) 在添加实现“com.google.android.gms:play services:12.0.1”后,同步模块:实现“com.android.support:appcompat-v7:28.0.0”上的应用程序始终出错 错误: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory)
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-19:19 to override.
清单合并失败:属性application@appComponentFactory值=(android.support.v4.app.CoreComponentFactory)来自[com.android.support:support compat:28.0.0]AndroidManifest.xml:22:18-91
在[androidx.core:core:1.0.0]AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory)中也存在。
建议:在AndroidManifest.xml:5:5-19:19处的元素中添加“tools:replace=“android:appComponentFactory””以覆盖。
通过选择Refactor>Migrate to AndroidX
迁移到AndroidX,让重构者完成工作,迁移到AndroidX怎么样
看起来你不想迁移到AndroidX,但你应该尝试一下,因为android support 28.0.0是最新版本,android从现在起只会更新AndroidX
这是Support Library 28.0.0的稳定版本,适合在生产中使用。这将是android.support打包下的最后一个功能版本,鼓励开发者迁移到AndroidX
您在一个项目中同时使用了
支持库
和androidx库
,这就是问题所在
将支持库更改为首选库
等等
您还可以从Android Studio本身迁移到AndroidX
只需转到重构>迁移到AndroidX>迁移
迁移检查的更多信息什么错误?????什么错误?也不要使用
com.google.android.gms:play services
对要使用的API使用单独的依赖项Follow.Manifest合并失败:属性application@appComponentFactory[com.android.support:support compat:28.0.0]AndroidManifest.xml:22:18-91中的value=(android.support.v4.app.CoreComponentFactory)也出现在[androidx.core:core:1.0.0]AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory)。建议:添加'tools:replace=“android:appComponentFactory”'要覆盖AndroidManifest.xml:5:5-19:19中的to元素。我使用这个'com.google.android.gms:play services location:17.0.0'实现,同样的错误您看到错误末尾的建议了吗?
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-19:19 to override.
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
testİmplementation 'junit:junit:4.13-beta-3'
androidTestİmplementation 'androidx.test:runner:1.3.0-alpha01'
androidTestİmplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'