安卓打包失败

安卓打包失败,本人安卓小白好像是这个https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom访问不了,有什么处理方法吗

Configure project :
Evaluating root project ‘proj.android-studio’ using build file ‘/Users/yanqiang/Documents/sxwork/game/NumberGame/build/jsb-link/frameworks/runtime-src/proj.android-studio/build.gradle’.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘proj.android-studio’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not resolve com.android.tools.build:gradle:3.2.0.
Required by:
project :
Could not resolve com.android.tools.build:gradle:3.2.0.
Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom’.
Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom’.
Read timed out

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 30s
Error running command, return code: 1.

这个地址在我这里直接打开是可以访问的

你直接打开可以访问说明你浏览器fan墙了,但是android studio并没有

确实是被墙了,改了build/jsb-link/frameworks/runtime-src/proj.android-studio/build.gradle 为下面的就好了

buildscript {

repositories {
    maven{ url 'https://maven.aliyun.com/repository/google' }
    maven{ url 'https://maven.aliyun.com/repository/jcenter' }
    maven{url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.0'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
maven{ url ‘https://maven.aliyun.com/repository/google’ }
maven{ url ‘https://maven.aliyun.com/repository/jcenter’ }
maven{url ‘http://maven.aliyun.com/nexus/content/groups/public’}
flatDir {
dirs ‘libs’
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

还有个办法是给android studio设置代理