当前版本的Android Gradle不支持按需配置

时间:2018-08-06 12:14:33

标签: java android android-gradle

这是我设置的:

File > Project Structure > Project > Project SDK = 10 (java version "10.0.1")
File > Project Structure > Project > Project Language level = SDK default (10 - Local variable type inference)
File > Project Structure > Modules > app > Module SDK = Project SDK (10)
Gradle Scripts > gradle.properties > org.gradle.configureondemand=false
Gradle Scripts > gradle-wrapper.properties > org.gradle.configureondemand=false

仍然出现错误:

Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6.

那是怎么了?

1 个答案:

答案 0 :(得分:0)

执行以下设置

文件->设置->构建,执行,开发->编译器

取消选中或取消选择“按需配置”选项