Retrolambda - Jack is required to support java 8 - warning fix

后端 未结 4 1252
礼貌的吻别
礼貌的吻别 2021-02-12 09:58

Is there a way to disable warning about

Jack is required to support java 8 language features.

while using Retrolambda?

I don

4条回答
  •  旧巷少年郎
    2021-02-12 10:29

    android studio

    Add below codes in your application gradle after that do synck

    // ----- add
    buildscript {
        repositories {
            mavenCentral()
        }
    
        dependencies {
            classpath 'me.tatarka:gradle-retrolambda:3.2.4'
        }
    }
    
    repositories {
        mavenCentral()
    }
    // ----- end
    
    apply plugin: 'com.android.application'
    apply plugin: 'me.tatarka.retrolambda' // ----- add 
    
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.2"
    
    //----add
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    

提交回复
热议问题