jadepeakpoet/ARouter

Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

Opened this issue · 1 comments

新版AS,按楼主方式配置项目,怎么都下不下来,翻墙啥的都试过了,无法下载

//settings.gradle

pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven { url 'https://www.jitpack.io' }
maven { url 'https://jitpack.io' }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url "https://maven.aliyun.com/repository/public" }

    google()
    mavenCentral()
}

}

//build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
dependencies {
//classpath 'com.google.dagger:hilt-android-gradle-plugin:2.45'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    //classpath "com.alibaba:arouter-register:1.0.2" //todo arouter
    classpath "com.github.jadepeakpoet.ARouter:arouter-register:1.0.1"
    //gradle 版本更新检测插件
    classpath "com.github.ben-manes:gradle-versions-plugin:0.39.0"
}

}

试试将maven { url 'https://jitpack.io/' }移除,换成或保留maven { url 'https://www.jitpack.io/' }

Android Studio maven { url 'https://jitpack.io' } 无法下载问题
https://www.jianshu.com/p/9e897888b0eb

另外这配置是和gradle版本和AGP以及应用的build.gradle相关的,不是直接配个settings.gradle就可以,你可以用最新的AS建立一个demo项目,参照下其中的配置。

然后除了这个之外,以下也是一些可能和代理配置相关的链接。

Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle. Consult IDE log for more details (Help | Show Log)
realm/realm-java#3636

Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle
https://stackoverflow.com/questions/33871563/errorconnection-timed-out-connect-if-you-are-behind-an-http-proxy-please-con