Android Studio之编译t提示Invoke-customs are only supported starting with Android O (--min-api 26)
程序员文章站
2022-06-07 18:35:48
...
1 问题
编译别人的项目,错误提示如下
Invoke-customs are only supported starting with Android O (--min-api 26)
2 解决办法
在app的build.gradle的android节点下添加如下代码
android {
compileSdkVersion 28
defaultConfig {
}
buildTypes {
}
//需要添加如下代码
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
推荐阅读
-
Invoke-customs are only supported starting with Android O (–min-api 26)
-
Error: Invoke-customs are only supported starting with Android O (--min-api 26)
-
Android Studio之编译t提示Invoke-customs are only supported starting with Android O (--min-api 26)
-
Error: Invoke-customs are only supported starting with Android O (--min-api 26)
-
Error: Invoke-customs are only supported starting with Android O (--min-api 26)
-
Android Studio运行失败:Error: Invoke-customs are only supported starting with Android O (--min-api 26)
-
Error: Invoke-customs are only supported starting with Android O (--min-api 26)
-
Invoke-customs are only supported starting with Android O (–min-api 26)
-
Error: Invoke-customs are only supported starting with Android O (--min-api 26)