有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java无法解析org。机器人向导:机器人向导:3+

这是我的身材。渐变文件:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.安卓.tools.build:gradle:0.14.2'
    }
}
apply plugin: 'com.安卓.application'

repositories {
    jcenter()
}

安卓 {
    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-安卓.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.安卓.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.

有什么想法吗


共 (1) 个答案

  1. # 1 楼答案

    你有代理人吗? 如果是这样,请查看gradle属性文件

    在C:\Users\下。渐变\创建渐变。包含代理详细信息的属性文件:

    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