Butterknife: Android X manifest merge issue

Created on 19 Dec 2018  路  3Comments  路  Source: JakeWharton/butterknife

Most helpful comment

You must enable jetifier with android.enableJetifier=true in your gradle.properties if you want to mix AndroidX with legacy support libraries.

All 3 comments

Once i add butterknife 9.0.0-rc2 to my project I start getting

Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:6:5-20:19 to override.

My dependencies list is below

dependencies {
def lifecycle_version = "2.0.0"
def support_version = "1.0.0"

implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation project(':api')

implementation "androidx.appcompat:appcompat:$support_version"
implementation "androidx.recyclerview:recyclerview:$support_version"
implementation "androidx.cardview:cardview:$support_version"

implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"

implementation 'com.jakewharton:butterknife:9.0.0-rc2'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'

testImplementation 'junit:junit:4.12'
androidTestImplementation "androidx.test:runner:1.1.0"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

}

You must enable jetifier with android.enableJetifier=true in your gradle.properties if you want to mix AndroidX with legacy support libraries.

Was this page helpful?
0 / 5 - 0 ratings