android studio0.5.7,在Android Studio v 0.5.7中禁用隨需配置

In the most recent update of Android Studio (v 0.5.7), the option "configure-on-demand" is used by default for gradle builds. This is causing a problem in my current project build. When I try to sync my project with gradle files in Android Studio, I get the following error:

在最近更新的Android Studio (v0.5.7)中,默認為gradle構建使用“configure-按需配置”選項。這在我當前的項目構建中造成了一個問題。當我嘗試將我的項目與Android Studio中的gradle文件同步時,我得到了以下錯誤:

Error:A problem occurred configuring project ':PROJECT_NAME'. Configuration with name 'default' not found.

錯誤:配置項目':PROJECT_NAME'出現了一個問題。未找到名稱為“default”的配置。

However everything works fine when I build using command line without the "configure-on-demand" flag.

然而,當我使用命令行構建而不使用“configure- demand”標志時,一切都很正常。

I tried disabling it by putting "org.gradle.configureondemand=false" in my gradle.properties but it seems that Android Studio doesn't respect this. I still get the same error and the gradle logs show:

我嘗試用“org.gradle”來禁用它。在我gradle configureondemand = false”。但似乎Android Studio並不尊重這一點。我仍然會得到相同的錯誤,而gradle日志顯示:

Configuration on demand is an incubating feature

按需配置是一種孵化特性

Is there a way to disable this in Android Studio ?

是否有辦法在Android Studio中禁用它?

1 个解决方案

#1

8

For Android Studio 1.5.1 - 3.1.3: Go to File > Settings > Build, Execution, Deployment > Compiler and turn off "Configure on demand".

對於Android Studio 1.5.1 - 3.1.3:去文件>設置>構建,執行,部署>編譯器,關閉“按需配置”。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值