I am in the process of refactoring to use AndroidX, and following updating my dependencies as follows:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.legacy:legacy-support-core-utils:1.0.0"
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
}
And updating my gradle.properties:
org.gradle.jvmargs=-Xmx1536m
android.useAndroidX = true
android.enableJetifier = false
I'm getting this error:
Program type already present: android.support.v4.app.INotificationSideChannel
Message{kind=ERROR, text=Program type already present: android.support.v4.app.INotificationSideChannel, sources=[Unknown source file], tool name=Optional.of(D8)}
So far as I can see this is due to Butterknife, but I'm not sure how to address it!
I wondered if changing the line android.enableJetifier = false to android.enableJetifier = true, would help, this gives a different error:
ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}'
Since the binding class is generated by the ButterKnife in compile time, I don' think android.enableJetifier = true will help.
I occurs this issue that android.support.annotation.UiThread is not found, which of course should not be found.
I hope the author can still maintain this project to support AndroidX...
Does the issue still happen on 9.0.0-SNAPSHOT? Context: https://github.com/JakeWharton/butterknife/issues/1280
Wow it seems no problem. Hope it can get update sooner.
Releasing soon
Most helpful comment
Releasing soon