Flutter --> D8: Invoke-customs are only supported starting with Android O (--min-api 26)

Flutter项目启动报错:

D8: Invoke-customs are only supported starting with Android O (--min-api 26)

解决方法:

android/app/build.gradle文件中的android项中加入如下设置即可:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

你可能感兴趣的:(Flutter --> D8: Invoke-customs are only supported starting with Android O (--min-api 26))