首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法解析org.roboguice:roboguice:3.+

无法解析org.roboguice:roboguice:3.+
EN

Stack Overflow用户
提问于 2015-01-08 07:08:05
回答 1查看 639关注 0票数 1

这是我的build.gradle文件:

代码语言:javascript
复制
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.+'
}

我不知道为什么,但有时我在构建时会遇到这个错误:

代码语言:javascript
复制
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.

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2015-01-08 07:13:38

你在代理背后吗?如果是这样,请检查gradle属性文件

在C:\Users.gradle\下,创建一个包含代理详细信息的gradle.properties文件:

代码语言:javascript
复制
systemProp.http.proxyHost=hostname
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=username
systemProp.http.proxyPassword=xxx

systemProp.https.proxyHost=hostname
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=username
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=localhost
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27830319

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档