gpt4 book ai didi

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

转载 作者:IT老高 更新时间:2023-10-28 12:50:08 24 4
gpt4 key购买 nike

升级到 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.

我尝试按照建议进行操作,但这并没有解决问题。有任何想法吗?非常感谢所有帮助,谢谢。

最佳答案

无需降级!

禁用按需配置需要两个步骤:

  1. 从 gradle.properties 中删除 org.gradle.configureondemand

  2. 在 Android Studio 中,
    对于 Mac 转到 Preferences > Build, Execution, Deployment > Compiler 并取消选中按需配置。< br/>对于 Linux/Windows 转到 File > Settings > 构建、执行、部署 > 编译器 并取消选中按需配置。

注意,有2个gradle.properties文件

  1. 在你的项目中gradle.properties
  2. ${HOME}/.gradle/gradle.properties

关于android - 当前版本的 Android Gradle 插件不支持按需配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49990933/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com