Flutter 错误:无法下载 bundletool.jar (com.android.tools.build:bundletool:0.9.0)
Posted
技术标签:
【中文标题】Flutter 错误:无法下载 bundletool.jar (com.android.tools.build:bundletool:0.9.0)【英文标题】:Flutter error: Could not download bundletool.jar (com.android.tools.build:bundletool:0.9.0) 【发布时间】:2020-03-08 20:33:00 【问题描述】:请问我该如何解决这个颤振错误
出了什么问题: 配置项目 ':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
请有人建议我如何解决此错误
【问题讨论】:
【参考方案1】:尝试将上面的url地址复制到浏览器中看看能不能访问 比如这个https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.3.50/
还请尝试查看您是否有代理或网络问题来访问互联网。
【讨论】:
以上是关于Flutter 错误:无法下载 bundletool.jar (com.android.tools.build:bundletool:0.9.0)的主要内容,如果未能解决你的问题,请参考以下文章
Flutter Xcode build failed 错误无法生成进程