阅读 529

Unable to load Maven meta-data from https://jcenter.bintray.com/com/aliyun/dpa/o

Launching lib/main.dart on HUAWEI MT7 TL10 in debug mode... Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong: Could not determine the dependencies of task ':aliossflutter:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':aliossflutter:debugCompileClasspath'. Could not resolve com.aliyun.dpa:oss-android-sdk:+. Required by: project :aliossflutter Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from maven.aliyun.com/repository/…. Could not HEAD 'maven.aliyun.com/repository/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from maven.aliyun.com/nexus/conte…. Could not HEAD 'maven.aliyun.com/nexus/conte…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from jcenter.bintray.com/com/aliyun/…. Could not HEAD 'jcenter.bintray.com/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from maven.aliyun.com/repository/…. Could not get resource 'maven.aliyun.com/repository/…'. Could not GET 'maven.aliyun.com/repository/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from download.flutter.io/com/aliyun/…. Could not get resource 'download.flutter.io/com/aliyun/…'. Could not GET 'download.flutter.io/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from download.flutter.io/com/aliyun/…. Could not get resource 'download.flutter.io/com/aliyun/…'. Could not GET 'download.flutter.io/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from download.flutter.io/com/aliyun/…. Could not get resource 'download.flutter.io/com/aliyun/…'. Could not GET 'download.flutter.io/com/aliyun/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from google.bintray.com/exoplayer/c…. Could not get resource 'google.bintray.com/exoplayer/c…'. Could not GET 'google.bintray.com/exoplayer/c…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused) Failed to list versions for com.aliyun.dpa:oss-android-sdk. Unable to load Maven meta-data from dl.google.com/dl/android/…. Could not get resource 'dl.google.com/dl/android/…'. Could not GET 'dl.google.com/dl/android/…'. Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused)

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

  • Get more help at help.gradle.org

BUILD FAILED in 2m 43s Finished with error: Gradle task assembleDebug failed with exit code 1

解决方法

  • 从报错看似乎是下载文件失败,可以尝试翻墙
  • 翻墙还不行的话,可以使用阿里云的镜像地址,因为Gradle的Maven仓库在国外。
    需要注释google()和jcenter(),添加如下代码
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' }
复制代码