1
這是我的build.gradle文件:無法解析org.roboguice:roboguice:3 +
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.14.2'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
}
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.example.stopcall.app"
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.3'
compile 'org.roboguice:roboguice:3.+'
provided 'org.roboguice:roboblender:3.+'
}
我不知道爲什麼,但有時我得到這個錯誤,而建設:
Error:Gradle: A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not resolve org.roboguice:roboguice:3.+.
Required by:
StopCall:app:unspecified
> Failed to list versions for org.roboguice:roboguice.
> Unable to load Maven meta-data from https://jcenter.bintray.com/org/roboguice/roboguice/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/org/roboguice/roboguice/maven-metadata.xml'.
> cache.corp.google.com: nodename nor servname provided, or not known
> Failed to list versions for org.roboguice:roboguice.
> Unable to load Maven meta-data from https://jcenter.bintray.com/org/roboguice/roboguice/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/org/roboguice/roboguice/maven-metadata.xml'.
> cache.corp.google.com
> Could not resolve org.roboguice:roboblender:3.+.
Required by:
StopCall:app:unspecified
> Failed to list versions for org.roboguice:roboblender.
> Unable to load Maven meta-data from https://jcenter.bintray.com/org/roboguice/roboblender/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/org/roboguice/roboblender/maven-metadata.xml'.
> cache.corp.google.com
> Failed to list versions for org.roboguice:roboblender.
> Unable to load Maven meta-data from https://jcenter.bintray.com/org/roboguice/roboblender/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/org/roboguice/roboblender/maven-metadata.xml'.
> cache.corp.google.com
what can it be? as it can happen in a specific hour and few hours later (maybe another network) it might be fixed.
有什麼想法?
這是我工作的筆記本電腦,所以我使用VPN代理時,我想連接到我的工作網絡。但是當我在家裏在沒有代理的私人WiFi上工作時會出現問題。 –
我不想在'.gradle'文件中寫入我的憑證。別無退路? –
如果您使用的是NTLM代理,則可以嘗試設置http://cntlm.sourceforge.net/。或者在android studio中這樣的東西http://stackoverflow.com/a/18443524/3724365 –