Why is butterknife 9.0.0-SNAPSHOT not resolving?
Please note that Butterknife has now reached 10.1.0 and there's no longer need for SNAPSHOT versions or any other maven libraries. AndroidX migration works as a charm. Just include:
dependencies {
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
}
or, if for some reason you're combining Kotlin and butterknife, replace annotationProcessor
with kapt
.
For more information, visit: https://github.com/JakeWharton/butterknife
UPDATE: You can now simply use ButterKnife 9-rc02 instead of the above mentioned solutions:
...
dependencies {
implementation 'com.jakewharton:butterknife:9.0.0-rc2'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'
...
Based on the answer from Naveen, the solution is here.
However, there are missing details. Please refer the below Gradle configurations for the complete solution:
buildscript {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha10'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
mavenCentral()
maven {
name 'Sonatype SNAPSHOTs';
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and
...
dependencies {
implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT'
...
Basically, don't use apply plugin: 'com.jakewharton.butterknife'
and classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'
from the suggestion here.
Also, this Android Studio Settings > Compiler configuration: