本文介绍了摇篮1.8版是必需的。现在的版本是1.9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android的工作室刚刚更新了自己0.4.2,现在解析失败我的项目与消息:

Android Studio just updated itself to 0.4.2, and now fails parsing my project with the message:

摇篮1.8版是必需的。现在的版本是1.9。如果使用的是  摇篮包装,尽量编辑distributionUrl ...

我尝试过各种东西,现在这一切都搞砸了。样的困惑是怎么回事,应该认为Android工作室知道哪些摇篮(无论是)版本,它已/已安装?

I tried various things and now it's all messed up. Kind of confused what's going on here, one should think Android Studio knows which Gradle (whatever that is) version it has/had installed?!

难道或许我的项目,申报了依赖于1.8,它再也找不到由于工作室更新更新其摇篮到1.9,还没有更新,从1.8现有项目的依赖,以1.9?

Is it perhaps my project which declared a dependency on 1.8, which it can no longer find due to the Studio update updating its gradle to 1.9, without also updating the existing project dependency from 1.8 to 1.9?

推荐答案

更​​新 distributionUrl YOUR_PROJECT /摇篮/ gradle-wrapper.properties 文件中,提到工作室(0.4 。2)应自动提示自动修复,同时摇篮同步,但如果它没有做手工。 distributionUrl应该像

Update distributionUrl mentioned in your YOUR_PROJECT/gradle/gradle-wrapper.properties file, Studio(0.4.2) should automatically prompt for auto fix while gradle sync but if it didn't do it manually. distributionUrl should be like

distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip

更新所有的 build.gradle 在你的项目,如果您使用的是顶级build.gradle文件只定义与

Update all build.gradle files inside your project or if you are using top level build.gradle file for defining gradle version update in that only with

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.7.+'
    }
}

Android的工作室(0.4.2)只支持1.9摇篮可使用的摇篮定义:0.7 + 在类路径依赖

这篇关于摇篮1.8版是必需的。现在的版本是1.9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 00:57