java - Flutter错误:无法下载bundletool.jar(com.android.tools.build:bundletool:0.9.0)

标签 java android gradle kotlin flutter

请问如何解决该抖动错误

什么地方出了错:
配置项目':flutter_udid'时发生问题。

Could not resolve all artifacts for configuration ':flutter_udid:classpath'.
   Could not download bundletool.jar (com.android.tools.build:bundletool:0.9.0)
      Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.9.0/bundletool-0.9.0.jar'.
         Read timed out
   Could not download kotlin-stdlib.jar (org.jetbrains.kotlin:kotlin-stdlib:1.3.50)
      Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.50/kotlin-stdlib-1.3.50.jar'.
         Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.50/kotlin-stdlib-1.3.50.jar'.
            Remote host closed connection during handshake
   Could not download gradle-download-task.jar (de.undercouch:gradle-download-task:3.4.3)
      Could not get resource 'https://jcenter.bintray.com/de/undercouch/gradle-download-task/3.4.3/gradle-download-task-3.4.3.jar'.
         Could not GET 'https://jcenter.bintray.com/de/undercouch/gradle-download-task/3.4.3/gradle-download-task-3.4.3.jar'.
            jcenter.bintray.com: Temporary failure in name resolution
   Could not download httpmime.jar (org.apache.httpcomponents:httpmime:4.5.6)
      Could not get resource 'https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.jar'.
         Could not GET 'https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.jar'.
            jcenter.bintray.com
   Could not download httpclient.jar (org.apache.httpcomponents:httpclient:4.5.6)
      Could not get resource 'https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.jar'.
         Could not GET 'https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.jar'.
            jcenter.bintray.com
   Could not download httpcore.jar (org.apache.httpcomponents:httpcore:4.4.10)
      Could not get resource 'https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.jar'.
         Could not GET 'https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.jar'.
            jcenter.bintray.com
   Could not download error_prone_annotations.jar (com.google.errorprone:error_prone_annotations:2.3.1)
      Could not get resource 'https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar'.
         Could not GET 'https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar'.
            jcenter.bintray.com
   Could not download kotlin-script-runtime.jar (org.jetbrains.kotlin:kotlin-script-runtime:1.3.50)
      Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-script-runtime/1.3.50/kotlin-script-runtime-1.3.50.jar'.
         Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-script-runtime/1.3.50/kotlin-script-runtime-1.3.50.jar'.
            jcenter.bintray.com
   Could not download kotlin-daemon-embeddable.jar (org.jetbrains.kotlin:kotlin-daemon-embeddable:1.3.50)
      Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.3.50/kotlin-daemon-embeddable-1.3.50.jar'.
         Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.3.50/kotlin-daemon-embeddable-1.3.50.jar'.
            jcenter.bintray.com
   Could not download trove4j.jar (org.jetbrains.intellij.deps:trove4j:1.0.20181211)
      Could not get resource 'https://jcenter.bintray.com/org/jetbrains/intellij/deps/trove4j/1.0.20181211/trove4j-1.0.20181211.jar'.
         Could not GET 'https://jcenter.bintray.com/org/jetbrains/intellij/deps/trove4j/1.0.20181211/trove4j-1.0.20181211.jar'.
            jcenter.bintray.com
   Could not download kotlin-build-common.jar (org.jetbrains.kotlin:kotlin-build-common:1.3.50)
      Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-build-common/1.3.50/kotlin-build-common-1.3.50.jar'.
         Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-build-common/1.3.50/kotlin-build-common-1.3.50.jar'.
            jcenter.bintray.com
   Could not download kotlinx-coroutines-core.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1)
      Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.1.1/kotlinx-coroutines-core-1.1.1.jar'.
         Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.1.1/kotlinx-coroutines-core-1.1.1.jar'.
            jcenter.bintray.com
   Could not download kotlin-stdlib-common.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50)
      Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.jar'.
         Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.jar'.
            jcenter.bintray.com
   Could not download trove4j.jar (org.jetbrains.trove4j:trove4j:20160824)
       Could not get resource 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
        Could not GET 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
            jcenter.bintray.com
   Could not download commons-codec.jar (commons-codec:commons-codec:1.10)
      Could not get resource 'https://jcenter.bintray.com/commons-codec/commons-codec/1.10/commons-codec-1.10.jar'.
         > Could not GET 'https://jcenter.bintray.com/commons-codec/commons-codec/1.10/commons-codec-1.10.jar'.
            > jcenter.bintray.com

* 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 https://help.gradle.org

BUILD FAILED in 6m 2s
  Command: /home/benny/Documents/Afiaanyi/mobile_app_codes/android/gradlew app:properties


请有人可以建议我如何解决此错误

最佳答案

尝试将上述网址复制到浏览器中,看看是否可以访问它们
例如这个https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.3.50/

另外,请尝试查看您是否有代理或网络问题来访问Internet。

关于java - Flutter错误:无法下载bundletool.jar(com.android.tools.build:bundletool:0.9.0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58830426/

相关文章:

android - Android 警报在过去执行了多远(以及为什么!)?

android - 将 DexGuard 集成到 Android Studio

java - IntelliJ 在打开 Gradle 项目时崩溃,为什么?

java - 无法使用 java.nio.channels.FileLock 在 Linux 上锁定文件

java - 对应 Google Client API for Java 的全局 HTTP 批处理端点更改

android - 使用预加载的 SQLite 更新应用程序

android - Eclipse 不显示 XML 错误

build - Gradle 多项目,更改默认构建文件名(build.gradle)

java - 何时在字符串文字上使用 intern()

Java spring noob bean 和配置