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

后端 未结 4 1229
逝去的感伤
逝去的感伤 2021-02-12 09:49

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:39

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.3"
        defaultConfig {
            applicationId "io.github.rxandroid"
            minSdkVersion 15
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            jackOptions {
                enabled true
    
            }
    
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        compile 'com.android.support:appcompat-v7:25.3.1'
        compile 'com.android.support.constraint:constraint-layout:1.0.2'
        testCompile 'junit:junit:4.12'
    
        compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
        compile 'io.reactivex:rxjava:1.3.0'
        compile 'com.jakewharton:butterknife:8.6.0'
        compile 'com.squareup.retrofit2:retrofit:2.3.0'
        compile 'com.squareup.retrofit2:converter-gson:2.2.0'
        compile 'com.squareup.retrofit2:adapter-rxjava:2.2.0'
    
    }
    

提交回复
热议问题