Butterknife: Butterknife with androidx

Created on 25 Jun 2018  路  5Comments  路  Source: JakeWharton/butterknife

I'm using the androidx support library, but I receive this error:

error: package android.support.annotation does not exist | 聽

I looked at the generated file from Butterknife and it tries to use old support library.

How can I fix this?

edit: I just saw this was implemented 11 days ago, I'm on the latest version but still getting this error...

Needs Info

Most helpful comment

The latest version being 9.0.0-SNAPSHOT?

All 5 comments

The latest version being 9.0.0-SNAPSHOT?

I'm not working with Matyas nor using the same project, just an unrelated person with the same (similar?) problem.

I tried migrating our project to AndroidX, and yes bumped Butter Knife to 9.0.0-SNAPSHOT. The build still failed for me.

I am using Butter Knife in a library module, using the butterknife-gradle-plugin and the error I've seen was in the library's R2.java file. Has this been by any chance missed in the recent PR or should this work as well?

I was using the 8.1.1 but with the snapshot version is working fine. Thank you!

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT'

Its still not working.
Same tried with android.support,It works fine. But not giving support to androidx

Was this page helpful?
0 / 5 - 0 ratings