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

后端 未结 4 955
没有蜡笔的小新
没有蜡笔的小新 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条回答
  •  轮回少年
    2020-12-31 04:40

    add this in your build.gradle:

    allprojects {
        repositories {
            jcenter()
        }
        gradle.projectsEvaluated {
            tasks.withType(JavaCompile) {
                options.compilerArgs << "-Xbootclasspath/a:" + System.properties.get("java.home") + "/lib/rt.jar"
            }
        }
    }
    

提交回复
热议问题