Gradle 同步失败:读取超时

Raw*_*wda 5 android android-gradle-plugin

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
Run Code Online (Sandbox Code Playgroud)

Android Studio 给了我这个错误,虽然gradle.properties里面没有代理:

gradle 同步失败读取超时

Raw*_*wda 4

问题已经解决:删除home中的gradle.properties文件。然后,android studio 开始下载丢失的文件。

  • 就我而言,我知道这应该是代理问题。我检查了 Android Studio IDE 设置中的代理设置,“gradle.properties”位于项目根路径,但不幸的是,忘记了“~/.gradle/gradle.properties”。删除 `~/.gradle/gradle.properties` 中无效的代理设置对我有用。 (2认同)