读取超时错误 builder.jar (com.android.tools.build:builder:3.2.1) - Flutter - Android Studio
Posted
技术标签:
【中文标题】读取超时错误 builder.jar (com.android.tools.build:builder:3.2.1) - Flutter - Android Studio【英文标题】:Read timed out Error builder.jar (com.android.tools.build:builder:3.2.1) - Flutter - Android Studio 【发布时间】:2019-12-20 11:58:40 【问题描述】:我只是想运行我的第一个颤振应用程序。
我已经尝试过使缓存失效。虽然我的网速很慢,但手动我已经在不到一分钟的时间内下载了依赖项。但我无法手动安装依赖项。
Launching lib\main.dart on XT1080 in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "C:\Users\Abuzar\androidStudioProjects\flutter_app3\android\gradlew.bat" exited abnormally:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not download builder.jar (com.android.tools.build:builder:3.2.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.2.1/builder-3.2.1.jar'.
> Read timed out
* 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 18m 48s
Command: C:\Users\Abuzar\AndroidStudioProjects\flutter_app3\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.
我的 build.gradle
buildscript
repositories
google()
jcenter()
dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
allprojects
repositories
google()
jcenter()
rootProject.buildDir = '../build'
subprojects
project.buildDir = "$rootProject.buildDir/$project.name"
subprojects
project.evaluationDependsOn(':app')
task clean(type: Delete)
delete rootProject.buildDir
我可以手动添加此 builder-3.2.1 依赖项或任何其他解决此问题的方法吗?如果是那怎么办?
【问题讨论】:
【参考方案1】:我遇到了同样的问题..我通过升级 gradle 来解决它.. 使用以下步骤:
打开gradle-wrapper.propitiates(如果找不到的话打开gradle>local propitiates然后点击Open for editing in android studio strong> 你会在那里找到 gradle-wrapper.propitiates。
将 distributionUrl=https://services.gradle.org/distributions/gradle-4.10.8-all.zip 更改为 distributionUrl=https://services。 gradle.org/distributions/gradle-XXX-all.zip 根据最新的 gradle 版本。
然后根据最新的可战斗gradle插件版本打开文件>项目结构>项目>android gradle插件版本(改成X.X.X)。
【讨论】:
以上是关于读取超时错误 builder.jar (com.android.tools.build:builder:3.2.1) - Flutter - Android Studio的主要内容,如果未能解决你的问题,请参考以下文章
JedisConnectionException - 读取超时错误
如何使用 Python 读取大型 Firestore 集合而不会遇到 503 超时错误