【问题标题】:Failed to resolve dependencies in gradle behind proxy无法解决代理后面的 gradle 中的依赖关系
【发布时间】:2015-10-13 09:09:31
【问题描述】:
Error:(27, 13) Failed to resolve: org.quanqi:android-view-pager-indicator:0.9.0
.....

Error:(29, 13) Failed to resolve: com.astuetz:pagerslidingtabstrip:1.0.1
....
Error:(28, 13) Failed to resolve: com.sothree.slidinguppanel:library:3.1.1
....

我的 gradle 依赖项是

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    //testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'org.quanqi:android-view-pager-indicator:0.9.0'
    compile 'com.sothree.slidinguppanel:library:3.1.1'
    compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
}

我的代理设置在 gradle.properties...(未显示凭据)

systemProp.http.proxyPassword=xxxxxx
systemProp.http.proxyHost=x.x.x.x
systemProp.http.proxyUser=xx@x.com
systemProp.http.proxyPort=8080

仍然 gradle build 失败...当我在防火墙外构建项目时,它的工作完美,然后不需要代理。我正在使用 Android Studio 1.4

我已经尝试了以下方法,但没有成功:-

Using ViewPagerIndicator library with Android Studio and Gradle

Use HTTP as default in IntelliJ or Android Studio

我已经为 Andriod Studio 和 SDK 配置了代理设置。

【问题讨论】:

    标签: android android-studio gradle proxy dependencies


    【解决方案1】:

    这三个 r 库项目并添加为

    build.gradle导入库模块为

    compile project(':library_projectname')
    

    settings.gradle中添加这一行

    include ':app', ':library_projectname'
    

    【讨论】:

    • 这不起作用...问题不在构建中...问题出现是因为 gradle 无法从存储库中获取库,
    猜你喜欢
    • 1970-01-01
    • 2018-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-03
    • 1970-01-01
    • 2015-10-27
    • 2016-02-16
    相关资源
    最近更新 更多