Android Jack: Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.util.function.Consumer

后端 未结 4 966
没有蜡笔的小新
没有蜡笔的小新 2020-12-31 04:22

Getting this on android studio 2.2.

Does anyone have a workaround?

My app build file is:

apply plugin: \'com.android.application\'

android {         


        
4条回答
  •  猫巷女王i
    2020-12-31 04:36

    upgrading android studio, the following seems to work (but it's really slow now):

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.0"
    
        defaultConfig {
            applicationId "acme.cb2"
            minSdkVersion 22
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            jackOptions {
                enabled true
           }
        }
        dexOptions {
            //javaMaxHeapSize "4G"
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:25.2.0'
        compile 'com.android.support:support-v4:25.2.0'
    }
    

提交回复
热议问题