Reputation: 30
I'm Still beginner in android app so when I'm trying to build this app I get the following error in the Log:
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-31:19 to override.
and the build.grade file had this dependencies
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7: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.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.xwray:groupie:2.3.0'
implementation 'com.xwray:groupie-kotlin-android-extensions:2.3.0'
implementation 'com.squareup.picasso:picasso:2.71828'
}
I try to google a solution but nothing find out.
Upvotes: 0
Views: 341
Reputation: 7
我也记录一下 再本人的设备上,是由于 androidx 和android support 不兼容导致。
删除项目所有androidx的方法,或者使用上面那个人说的。 查看当前项目是否引用androidx相关的库, 请再terminal 里面执行 gradlew :app:dependencies >1.txt 然后查看是否有androidx 的关键字,然后把相应的导入库也成支持的即可。
Upvotes: 0
Reputation: 1808
Add these lines to gradle.properties
file:
android.useAndroidX=true
android.enableJetifier=true
Explanation: some of the dependencies, for example com.xwray:groupie:2.3.0, use Android X. Jetifier is required to use android.support.* classes in Android X, as suggested here.
Upvotes: 1