问题描述
今天早上我已经从SVN更新我的Android项目,增加code的一些新的线路和测试:一切做工精细
This morning I've updated from SVN my Android project, added some new lines of code and tested: everything work fine.
后来我试了几分钟的时间我的设备上再次运行应用程序,但现在Android的工作室告诉我:
A couple of minutes later I've tried to run again the application on my device but now Android Studio tells me:
Gradle 'iSfa' project refres failed
Error: protocol family unavailable
的build.gradle
的内容是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
packagingOptions {
exclude 'LICENSE'
exclude 'NOTICE'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
defaultConfig {
applicationId "it.gn.sfa"
minSdkVersion 15
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
maven {
url "http://JRAF.org/static/maven/2"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/android-support-v4-r10.jar')
compile files('libs/android-support-v4.jar')
compile 'com.fasterxml.jackson.core:jackson-core:2.3.2'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.3.2'
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.2'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'org.springframework.android:spring-android-core:1.0.1.RELEASE'
compile 'org.jraf:android-switch-backport:1.3.1'
}
和gradle这个设置的内容是:
And the content of gradle settings is:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
allprojects {
repositories {
jcenter()
}
}
请注意:我使用的是最新版本的Android工作室,发布0.8.6和gradle这个最新版本,版本0.12.2提供
Note: I'm using the latest version of Android Studio, release 0.8.6, and the latest version of gradle, release 0.12.2.
删除 .gradle
文件夹不解决任何问题。
Deleting the .gradle
folder don't solve anything.
推荐答案
由OP找到解决方法:
删除 .gradle
文件夹,关闭Windows的防火墙和重建项目(与gradle这个资料库的完整下载)对我来说工作得很好。
Deleting .gradle
folder, turn off Windows' firewall and rebuild project (with a complete download of the gradle repository) worked fine for me.
这篇关于摇篮项目刷新失败 - 协议家族不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!