我正在尝试实现Iconics库,但出现此错误。
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0-rc02] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0-rc02] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:7:5-58:19 to override.
这是我的依赖项:
final String version= '28.0.0-rc02'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.support:support-v4:$version"
implementation "com.android.support:appcompat-v7:$version"
implementation "com.android.support:design:$version"
implementation "com.android.support.constraint:constraint-layout:1.1.3"
implementation "com.github.GrenderG:Toasty:1.3.0"
implementation "com.github.daniel-stoneuk:material-about-library:2.3.0"
implementation "com.mikepenz:iconics-core:3.1.0-rc02"
implementation 'com.mikepenz:community-material-typeface:2.7.94.1@aar'
}
我该怎么办?
答案 0 :(得分:10)
在Gradle.Properties中添加以下两行
android.useAndroidX=true
android.enableJetifier=true
我有同样的问题, 或点击以下链接
答案 1 :(得分:0)
我有同样的问题,这是我的答案:
在您的Manifest.xml文件中,添加几行代码。
<application
tools:replace="android:appComponentFactory"
android:appComponentFactory="Any character"
......
>