当前位置: 移动技术网 > IT编程>移动开发>Android > 【Android】AS报错:Configuration on demand is not supported by the current version of the Android Gradle

【Android】AS报错:Configuration on demand is not supported by the current version of the Android Gradle

2018年09月12日  | 移动技术网IT编程  | 我要评论

心电图机导联线,通县租房,今天新开奇迹私服

【错误】

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.

【翻译】

由于使用你正在使用 gradle?版本4.6或以上,当前版本的android的?gradle?插件不支持按需配置。

建议:通过在你的?gradle.properties 文件中设置?org.gradle.configureondemand=false?禁用按需配置,或者使用一个低于4.6版本的?gradle。

【解决方法1:降级】

打开?gradle-wrapper.properties 文件,修改?distributionurl 参数,将其后面修改为低于4.6版本的 gradle。如:

distributionurl=https\://services.gradle.org/distributions/gradle-4.5-all.zip

\

【解决方法2:禁用按需配置】

1、打开?gradle.properties 文件,共有两个:global propertiesproject?properties,将其中的

org.gradle.configureondemand=true

修改为

org.gradle.configureondemand=false
或删除该语句,或注释掉该语句。

\

2、通过 file 菜单,点击 settings,或按 ctrl+alt+s?打开设置。

\

3、找到 build, execution, deployment 里面的 compiler,将右面的 configure on demand 取消勾选。

\

【注意事项】

方法2中,第一步的?gradle.properties?文件,共有两个:global properties?和?project?properties,全都需要修改。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网