Android的工作室从0.1.9升级到0.2.0,现在的gradle造成构建错误

Android的工作室从0.1.9升级到0.2.0,现在的gradle造成构建错误

问题描述:

我目前的项目已经建设有摇篮就好了,因为
我创建它(大约一个月前),收购Android的工作室。
[我安装了一些早期更新到Android工作室,并且没有
问题的。]

My current project had been building with Gradle just fine, since I created it (about a month ago), after acquiring Android-Studio. [I installed some earlier updates to Android-Studio, and had no problems with those.]

不过,今天,当我升级的Andr​​oid-Studio的最新更新一
7月11日建设,从0.1.9版本到0.2.0,我
项目开工抱怨摇篮现在需要在
最小的0.5.0。 (我的项目要求的摇篮0.4,这
新的Studio升级标记我的摇篮建立并表示,将
现在需要这个新的更高的最低摇篮中。

But, today, after I upgraded Android-Studio's newest update to a "July 11th" build, going from version 0.1.9 to 0.2.0, my project started complaining that Gradle now needs to be at minimum of 0.5.0. (My project was asking for Gradle 0.4, and this new Studio upgrade flagged my Gradle build and stated it would NOW need this new higher minimum of Gradle.

那么,什么我对不清楚:我一直假设是摇篮的一部分
(捆绑)Android的工作室。

So, what I'm unclear about: I've been assuming Gradle is PART of (bundled with) Android Studio.

我现在需要一个新的摇篮,作为一个独立的产品/更新?

Do I now need to get a newer Gradle, as a separate product/update?

我很困惑!

编辑:。(这是Windows的7下发生的)

(This is happening under Windows-7).

第1步:的build.gradle 更改行:

dependencies {
    classpath 'com.android.tools.build:gradle:0.4'
}

dependencies {
    classpath 'com.android.tools.build:gradle:0.5.+'
}

注意:对于gradle这个更新版本,您可能需要将其更改为 0.6 + 而不是

第二步:< YourProject> .iml 文件,删除整个<成分名称= FacetManager> [...] LT; /成分> 标签

Step 2: In the <YourProject>.iml file, delete the entire<component name="FacetManager">[...]</component> tag.

第3步 (也许不是必要的)的:在Android SDK管理器,安装(如果尚未安装) Android的支持库附加功能下。

Step 3 (Maybe not necessary): In the Android SDK manager, install (if not already installed) Android Support Repository under Extras.

信息发现这里