本文主要是介绍Android Configuration on demand is not supported by the current version of the Android Gradle plugin,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.错误如下:
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.
2.翻译:
当前版本的Android Gradle插件不支持按需配置,因为您使用的是Gradle 4.6或更高版本。建议:通过在gradle.properties文件中设置org.gradle.configureOnDemand=false或使用小于4.6的渐变版本来禁用按需配置。
3.解决方法:
1).打开?gradle-wrapper.properties 文件,修改?distributionUrl 参数,将其后面修改为低于4.6版本的 Gradle。如:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
2).打开?gradle.properties 文件,共有两个:Global Properties 和 Project?Properties,将其中的
org.gradle.configureondemand=true
改为:
org.gradle.configureondemand=false
注意:gradle.properties文件,共有两个:Global Properties和?Project?Properties,全都需要修改
或删除该语句,或注释掉该语句。
然后,通过 File 菜单,点击 Settings,或按 Ctrl+Alt+S?打开设置;找到 Build, Execution, Deployment 里面的 Compiler,将右面的 Configure on demand 取消勾选。
这篇关于Android Configuration on demand is not supported by the current version of the Android Gradle plugin的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!