【发布时间】:2014-05-01 16:57:59
【问题描述】:
我在 Android Studio 中构建新的 Hello World 项目时收到一条错误消息:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'MyApplication2'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:0.9.1.
Required by:
:MyApplication2:unspecified
> No cached version of com.android.tools.build:gradle:0.9.1 available for offline mode.
BUILD FAILED
Android Studio 版本:0.5.2
Gradle 版本:0.9.1
我正在使用代理连接到 Internet。
【问题讨论】:
-
您是否尝试过将您的 Android Studio 配置为使用代理服务器。你可能想看看这个stackoverflow.com/questions/18443208/androidstudio-gradle-proxy
-
描述您的“代理连接到互联网”。显然,初始缓存没有按照此处所述完成:stackoverflow.com/questions/20746071/…
-
感谢您的解决方案,但现在我遇到了另一个问题。无法刷新 Gradle 项目“我的应用程序 2”无法获取“repo1.maven.org/maven2/com/android/tools/build/gradle/0.9.1/…”。从服务器收到状态码 500:Internal Server Error Enable Gradle 'offline mode' and sync project 如上所述,我已经在 Android Studio 中配置了代理设置。
标签: android android-studio gradle android-gradle-plugin