Android的工作室摇篮问题升级到0.5.0版本

编程入门 行业动态 更新时间:2024-10-14 00:31:01
本文介绍了Android的工作室摇篮问题升级到0.5.0版本 - 摇篮迁移从0.8到0.9 - 而且Android的工作室升级到0.8.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在升级消息指出:

Failed to refresh Gradle project 'XXX' The project is using an unsupported version of the Android Gradle plug-in (0.8.3). Version 0.9.0 introduced incompatible changes in the build language. Please read the migration guide to learn how to update your project.

同类问题升级到Android Studio中的版本后,> = 0.8.0

Same kind of issue after upgrade to Android Studio to version >= 0.8.0

推荐答案

要解决这个问题,叫 build.gradle 在项目的根打开的文件,并更改摇篮版本有至0.9。+

To fix it, open file called build.gradle in the project root, and change gradle version there to 0.9.+.

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

要重复每个项目;(

如果你再得到这样的消息的无法加载类' org.gradle.api.artifacts.result.ResolvedComponentResult 的。

If you then get a message like "Unable to load class 'org.gradle.api.artifacts.result.ResolvedComponentResult".

进入您 project_folder /摇篮/包装目录,并修改无法加载类的org.gradle.api.artifacts.result.ResolvedComponentResult 文件修改 distributionUrl 到

Go to you project_folder/gradle/wrapper directory and edit Unable to load class 'org.gradle.api.artifacts.result.ResolvedComponentResult'. file changing the distributionUrl to

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

升级到0.8.1版本后(完整下载和复制SDK文件夹以上),必须有摇篮的通过IDE安装新版本(使用修复链接几个时间:S),以及对矫正的在项目文件夹中的文件的摇篮,从19.0到19.1的Andr​​oid部分,如下图所示:     buildscript {         库{             mavenCentral()         }         依赖{             类路径com.android.tools.build:gradle:0.12.+         }     }     应用插件:机器人

After upgrade to version 0.8.1 (full download and copy SDK folder over), had to have new version of gradle installed by IDE (using the "Fix it" link a couple of time :S ), and modifing the "android" section of the gradle file in project folder from 19.0 to 19.1, as below: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.12.+' } } apply plugin: 'android'

repositories { mavenCentral() } android { compileSdkVersion 19 buildToolsVersion '19.1.0' defaultConfig { minSdkVersion 7 targetSdkVersion 19 } } dependencies { compile 'com.android.support:appcompat-v7:19.1.+' compile 'com.android.support:support-v4:19.1.0' }

更多推荐

Android的工作室摇篮问题升级到0.5.0版本

本文发布于:2023-11-25 10:38:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1629423.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:升级到   摇篮   工作室   版本   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!