问题描述
我从摇篮到0.8 0.9更新,但它给了我不兼容的问题。我试图修复它,但我不知道究竟问题出在哪里。
一个帮助真的是AP preciated。这是我的摇篮文件:)谢谢!
应用插件:'机器人'安卓{
compileSdkVersion 19
buildToolsVersion '19 .0.1 defaultConfig {
14的minSdkVersion
targetSdkVersion 19
版本code 1
的versionName1.0
}
buildTypes {
发布 {
runProguard假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard的-rules.txt
}
}
}应用插件:'机器人'库{
mavenCentral()
}依赖{
编译com.fasterxml.jackson.core:杰克逊 - 数据绑定:2.2 +。
编译com.fasterxml.jackson.core:杰克逊核心:2.2 +。
编译com.fasterxml.jackson.core:杰克逊的注解:2.2 +。
编译公地郎咸平:公地郎咸平:2.6
编译com.nhaarman.listviewanimations:库:2.5.2
编译文件(库/ TestFlightLib.jar')
编译com.android.support:support-v4:19.0.1
}安卓{
packagingOptions {
排除META-INF /相关内容
排除META-INF /注意事项
排除META-INF / LICENSE
排除META-INF / LICENSE.TXT
排除META-INF / NOTICE.txt
}
}
编辑:
该错误是一样的东西:
无法刷新摇篮工程gradle这个'
无法加载类的org.gradle.api.artifacts.result.ResolvedComponentResult。
这是一个意外的错误。请提交包含idea.log文件中的错误。
好吧,我固定它。对于那些谁正在阅读,问题是位于
gradle这个/包装/ gradle-wrapper.properties
文件。该文件应与此类似:
#Fri三月07 11点15分二十○秒CET 2014年
distributionBase = GRADLE_USER_HOME
distributionPath =包装/ dists中
zipStoreBase = GRADLE_USER_HOME
zipStorePath =包装/ dists中
distributionUrl = HTTP \\://services.gradle.org/distributions/gradle-1.10-all.zip
在特定的,你需要gradle这个-1.10,而不是gradle这个-1.9
如果您没有此文件(这是我的情况),只需创建它,重建项目。如果仍有错误,清理项目,然后重新建立它。
I've updated from Gradle 0.8 to 0.9 but it gives me incompatibility problems. I've tried to fix it but I don't know exactly where the problem is.
A help is really appreciated.. this is my Gradle file :) thanks!
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.1'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.fasterxml.jackson.core:jackson-databind:2.2.+'
compile 'com.fasterxml.jackson.core:jackson-core:2.2.+'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.+'
compile 'commons-lang:commons-lang:2.6'
compile 'com.nhaarman.listviewanimations:library:2.5.2'
compile files('libs/TestFlightLib.jar')
compile 'com.android.support:support-v4:19.0.1'
}
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
EDIT:
The error is something like:
Failed to refresh Gradle project 'gradle'
Unable to load class 'org.gradle.api.artifacts.result.ResolvedComponentResult'.
This is an unexpected error. Please file a bug containing the idea.log file.
Ok, I fixed it. For those who are reading, the problem is located in your
gradle/wrapper/gradle-wrapper.properties
file. The file should be similar to this:
#Fri Mar 07 11:15:20 CET 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
In particular, you need gradle-1.10 and not gradle-1.9
If you don't have this file (that was my case), just create it and rebuild the project. If there are still errors, clean the project and build it again.
这篇关于从的gradle 0.8至0.9更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!