AndroidStudio - 摇篮刷新失败 [英] AndroidStudio - Gradle Refresh Failed
问题描述
我用的是最新的Android版本工作室打造我的应用程序为Android。该摇篮包装成立了摇篮的安装和项目建设没有错误。
最后,我开始我每次重新启动时有一个错误。
摇篮:出现了故障配置项目:应用程序。
未能解决所有依赖关系配置:应用程序:类路径。 无法解析com.android.tools.build:gradle:0.5.+。 要求: 应用:应用程序:未指定
org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
这个问题可能是固定的执行gradlew再次,构建了罚款。但0.3的Android工作室更新和android插件升级到0.6后,+我甚至不能执行gradlew再没有得到该错误消息。
我试图卸载机器人工作室及其所有配置文件,在项目和主目录,甚至.m2目录库中删除的.gradle文件夹。我甚至不能启动一个新的Android项目时,出现了同样的错误,所以应该有我的build.grade没有问题
buildscript {
库{
mavenCentral()
}
依赖{
类路径com.android.tools.build:gradle:0.6.+
}
}
应用插件:'机器人'
库{
mavenCentral()
}
安卓{
compileSdkVersion 18
buildToolsVersion18.1.1
defaultConfig {
的minSdkVersion 15
targetSdkVersion 18
}
sourceSets {
主要 {
manifest.srcFile钢骨混凝土/主/ AndroidManifest.xml中
java.srcDirs = ['的src / main / java目录]
res.srcDirs = ['钢骨混凝土/主/ RES']
}
}
}
依赖{
编译com.android.support:support-v4:18.0.0
编译org.jsoup:jsoup:1.7.2
}
我是能够解决的问题。我不知道是什么原因造成的错误,但它走了。步骤来解决:
- 备份和删除现有项目
- 在卸装机器人工作室0.3
- 删除.gradle /和.androidstudio /用户目录
- 在安装Android的工作室0.2.X
- 在修补Android的工作室0.2.9
- 重新导入code备份
I was using the up to date version of android studio to build my app for android. The gradle wrapper set up the gradle installation and the project was build without errors.
Eventually I started getting one error each time I restarted.
Gradle: A problem occurred configuring project ':App'.
Could not resolve all dependencies for configuration ':App:classpath'. Could not resolve com.android.tools.build:gradle:0.5.+. Required by: App:App:unspecified
org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
The issue could be fixed by executing gradlew again and builds went fine. But after the 0.3 android studio update and android plugin update to 0.6.+ I can't even execute gradlew anymore without getting this error message.
I tried uninstalling android studio with all its configuration files, deleted the .gradle folders in the project and home directory and even the .m2 repository. I can't even start a new android project, it fails with the same error, so there should be no issue with my build.grade
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 18
buildToolsVersion "18.1.1"
defaultConfig {
minSdkVersion 15
targetSdkVersion 18
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java']
res.srcDirs = ['src/main/res']
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'org.jsoup:jsoup:1.7.2'
}
I was able to solve the problem. I don't know what caused the bug, but its gone. Steps to fix:
- Backup and delete existing project
- Deinstalling android studio 0.3
- Deleting .gradle/ and .androidstudio/ in user directory
- Installing android studio 0.2.X
- Patching android studio to 0.2.9
- Reimporting code backup
这篇关于AndroidStudio - 摇篮刷新失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!