现象
之前项目都是用的gradlew 4.4,升级到4.6的时候报错,错误信息如下:
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.
但是按照提示设置了org.gradle.configureondemand=false并没有起作用
解决
- 在gradle.properties删除org.gradle.configureondemand
- Linux: File > Settings > Build, Execution, Deployment > Compiler,去掉configure on demand的勾选
网友评论