Butterknife: 依赖最新版的9.0.0-rc2运行报错

Created on 20 Nov 2018  ·  15Comments  ·  Source: JakeWharton/butterknife

Error: Static interface methods are only supported starting with Android N (--min-api 24): void butterknife.Unbinder.lambda$static$0()

Most helpful comment

@moneeWong Add this to your build.gradle

 android {
    ...........................

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}

All 15 comments

you can use old version.

As per the release notes (https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md#version-900-rc2-2018-11-19), all artifacts are built with Java 8 and so you need to set your consuming projects to use Java 8 as well.

@moneeWong Add this to your build.gradle

 android {
    ...........................

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}

Here it works, thank you

Thanks

who thank you @elirehema

thank you @elirehema

@elirehema your solution worked for me, thanks

thank you @elirehema

it works for me ,kudos

Thanks @elirehema

Thanks @elirehema

thanks a lot bro ,it works

Thanks

thanks @elirehema , it worked for me

Was this page helpful?
0 / 5 - 0 ratings