当前位置 : 主页 > 手机开发 > android >

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

来源:互联网 收集:自由互联 发布时间:2021-06-11
升级到 Android Studio 3.1.2后,我收到以下错误: 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 de
升级到 Android Studio 3.1.2后,我收到以下错误:

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.properties中删除org.gradle.configureondemand.
>在Android Studio中,
对于Mac,请转到首选项>构建,执行,部署>编译并取消选中按需配置.
对于Linux / Windows,请转到文件>设置>构建,执行,部署>编译并取消选中按需配置.

注意,有2个gradle.properties文件

>在您的项目gradle.properties中> ${HOME} /.gradle / gradle.properties

网友评论