如何获得摇篮1.9 Android的工作室0.3.6运行? [英] How to get Gradle 1.9 in android-studio 0.3.6 running?

查看:135
本文介绍了如何获得摇篮1.9 Android的工作室0.3.6运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是花一些时间和失败的尝试从迁移的gradle 1.8现有的Andr​​oid Studio项目到摇篮1.9决赛(这是昨天发布的 11月19日的)。

I just spend some time and failed trying to migrate an existing android studio project from gradle 1.8 to gradle 1.9 final ( which was released yesterday 19th Nov ).

我看了大部分的gradle其他相关的帖子在这里,但没有为我工作。
这里是我到目前为止已经试过清单:

I read most of the other gradle related posts here but none worked for me. here a list of what I've tried so far:


  • 的gradle ./ /包装/ gradle-wrapper.properties改变distributionUrl到gradle-1.9-all.zip

  • 重建项目

  • 在Android的工作室:工具 - > Android的 - >同步工程与摇篮文件

  • 在项目运行DIR命令包装的gradle 更新包装

  •   -
  • ./gradle/wrapper/gradle-wrapper.properties changed distributionUrl to gradle-1.9-all.zip
  • Rebuild Project
  • in android-studio: Tools -> Android -> Synch Project with Gradle Files
  • running command gradle wrapper in project dir to update the wrapper
  • -

的build.gradle 文件

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

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 16
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
}

dependencies {
    compile 'com.android.support:appcompat-v7:18.0.0'
}

所有的结束的gradle需要1.8,改变你的gradle-wrapper.properties为gradle-1.8-all.zip错误消息。

all ended with the "need gradle 1.8, change your gradle-wrapper.properties to gradle-1.8-all.zip" error message.

推荐答案

摇篮1.9不与Android插件0.6.3支持;它需要1.8。该插件使用内部摇篮API和绑定到特定的摇篮版本,以确保它的工作原理。这一限制将在未来被解除,但需要在摇篮一些新的特点。

Gradle 1.9 isn't supported with the Android plugin 0.6.3; it requires 1.8. The plugin uses internal Gradle APIs and is tied to specific Gradle versions to ensure it works. This limitation will be lifted in the future, but will require some new features in Gradle.

插件的下一版本将支持摇篮1.9。

The next version of the plugin will support Gradle 1.9.

编辑:

Android的工作室0.4.0和Android摇篮插件0.7.0已被释放;这些支持摇篮1.9。在写这篇文章的时候,摇篮1.10是最新的,但不是在插件v0.7.0被支持。

Android Studio 0.4.0 and Android Gradle plugin 0.7.0 have been released; these support Gradle 1.9. At the time of writing, Gradle 1.10 is current, but is not supported yet in v0.7.0 of the plugin.

这篇关于如何获得摇篮1.9 Android的工作室0.3.6运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆