Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

android

I was trying to debug an app when I encountered this error

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

Here is my gradle

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 29
        buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.github.webrtc"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        }
    }




    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('androidx.test.espresso:espresso-core:3.1.0', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation 'fi.vtt.nubomedia:kurento-room-client-android:1.1.2' 
        implementation 'org.whispersystems:webrtc-android:M59'
        implementation 'com.jakewharton:butterknife:10.0.0'
        annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
        implementation "org.java-websocket:Java-WebSocket:1.3.0"
        implementation 'com.squareup.okhttp3:okhttp:3.9.0'
        implementation 'androidx.appcompat:appcompat:1.1.0'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    }
like image 505
Mbula Mboma Jean gilbert Avatar asked Jan 25 '23 23:01

Mbula Mboma Jean gilbert


1 Answers

Read the "Download" section of Butterknife's github page.
https://github.com/JakeWharton/butterknife

android {
  ...
  // Butterknife requires Java 8.
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

dependencies {
  implementation 'com.jakewharton:butterknife:10.2.1'
  annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
}

You need to add the compileOptions part.

like image 52
Moonbloom Avatar answered Jan 27 '23 13:01

Moonbloom