我的应用程序之前工作正常,但最近在android pie更新后我将targetSDKVersion更改为28并添加了材料设计支持并得到了此错误.
清单合并失败:来自[com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91的属性应用程序@ appComponentFactory值=(android.support.v4.app.CoreComponentFactory)也出现在[androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value =(androidx.core.app.CoreComponentFactory).建议:在AndroidManifest.xml:7:5-53:19中添加'tools:replace ="android:appComponentFactory"'来覆盖.
我已经更新了所有的库,并尝试了它给我的所有建议,但仍然,我无法弄清楚该程序.以下是我添加的依赖项.
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-compat:28.0.0'
implementation 'com.android.support:mediarouter-v7:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "com.android.support:support-core-utils:28.0.0"
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation group: 'com.android.support', name: 'customtabs', version: '28.0.0'
}
Run Code Online (Sandbox Code Playgroud)
它说你的support依赖与androidx.core依赖有冲突
android studio不能同时使用android x与先前support依赖项的依赖项.你应该只使用其中一个.
使用这些依赖项
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
Run Code Online (Sandbox Code Playgroud)
使用此链接重构您的依赖项 https://developer.android.com/topic/libraries/support-library/refactor
| 归档时间: |
|
| 查看次数: |
872 次 |
| 最近记录: |