【问题标题】:connection timed out error in online mode and could not open file in offline mode - android studio在线模式下连接超时错误,无法在离线模式下打开文件 - android studio
【发布时间】:2018-05-19 01:46:21
【问题描述】:
repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.github.PhilJay:MPAndroidChart:v2.2.2'
}

我在在线模式下获得Error:Connection timed out: connect,而在将 gradle 设置更改为离线时,我无法打开库。

【问题讨论】:

  • 代理问题?你能在浏览器中打开jitpack.io吗?

标签: android android-studio android-gradle-plugin android-library android-gradle-3.0


【解决方案1】:

也许,您的互联网连接太慢了。 您可以从github 下载此库并导入到您的项目中。

这里是github 存储库链接: https://github.com/PhilJay/MPAndroidChart

只需点击下载按钮,然后选择下载ZIP,下载后,复制文件夹MPChartLib并粘贴到您的项目根目录并@ 987654324@ 和gradle

在您的 settings.gradle 中,include ':app', ':MDChartLib'build.gradle(Module:app)compile project(':MDChartLib')

【讨论】:

    【解决方案2】:

    请连接到“Internet”并重新同步。

    【讨论】:

    • 始终连接
    猜你喜欢
    • 2010-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-02
    • 2015-07-07
    相关资源
    最近更新 更多