Default interface methods are only supported starting with Android N

后端 未结 10 1547
天命终不由人
天命终不由人 2020-11-27 10:17

I upgraded to android studio 3.1 and I\'m getting the following error:

Default interface methods are only supported starting with Android N (--min-api 24): vo         


        
10条回答
  •  没有蜡笔的小新
    2020-11-27 10:56

    Update your build.gradle(Module:app) add compileOptions block and add JavaVersion.VERSION_1_8

    apply plugin: 'com.android.application'
    
    android {
        .................
        .........................
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
    

提交回复
热议问题