我已经安装了新的Android Studio。一切都工作得很好,但当我试图创建一个新项目时,它在下载Gradle时卡住了。

有没有办法手动安装Android Studio所需的Gradle ?或者有其他方法可以解决这个问题吗?


当前回答

对我有用的是:

创建一个虚拟项目,当它卡在Build屏幕上时, 终止studio进程。 打开android studio,打开项目,项目就会崩溃 用已经打开的虚拟项目创建一个新项目,它将毫无问题地创建项目 关闭虚拟项目,享受乐趣

其他回答

我通过删除.gradle文件夹解决了这个问题

在windows中: C:\Users{已登录用户}.gradle

是的,有。

Create a new project and you should Shutdown The Android Studio Application.(Because it takes a long time for you). Goto C:\Users\{Logged in User}\.gradle folder There is a folder there that show you which version of gradle Android Studio requires (e.g. gradle-1.8-bin) Download this version from internet (e.g. gradle-1.8-bin.zip). Goto C:\Users\{Logged in User}\.gradle\wrapper\dists\gradle-1.8-bin There is a folder here that its name is like a GUID. You should just copy the zip file that you've already downloaded from internet into this folder. Execute Android Studio and create a new project.

Gradle弹出窗口只显示断断续续的进度,对于了解下载是否卡住或非常慢并没有太大帮助。

这将有助于从命令行构建你的应用程序,在那里你可以得到下载的实际进展

./gradlew build

Android Studio自带Gradle,但它没有命令行Gradle功能。

使缓存无效并重新启动

这对我很管用。