简体   繁体   English

即使在完全格式化的Mac上重新安装后,Android Studio也会停留在构建“ Project_Name” Gradle项目信息上

[英]Android Studio gets stuck at Building 'Project_Name' Gradle project info even after Re-Installing on completely formatted Mac

I installed android studio 2.3.3 on my Mac and it cannot create any new project. 我在Mac上安装了android studio 2.3.3,它无法创建任何新项目。 It gets stuck at Building 'Project_Name' Gradle project info. 它停留在Building'Project_Name'Gradle项目信息中。 I waited for long time but it does not go ahead. 我等了很长时间,但没有成功。 I deleted .gradle folder and then tried still the problem persists. 我删除了.gradle文件夹,然后尝试仍然存在该问题。 I Even tried re-installing android studio but then again the same problem. 我什至尝试重新安装android studio,但随后又遇到了同样的问题。 So at last I formatted my Mac and then installed studio then also it gives me same problem. 所以最后我格式化了Mac,然后安装了studio,这也给我带来了同样的问题。

This has happened to me as well. 这也发生在我身上。 It must be downloading gradle distribution in background which can take some time. 它必须在后台下载gradle分发,这可能需要一些时间。 To check if it is downloading gradle or not, do the following: 要检查它是否正在下载gradle,请执行以下操作:

  • Kill all the instances of android studio first or just restart the computer. 首先杀死android studio的所有实例,或者只是重新启动计算机。
  • launch android studio using terminal and keep it open. 使用终端启动android studio并保持打开状态。
  • Create a project and now when you see it is stuck, go back to terminal and it should show the progress for gradle download. 创建一个项目,现在当您看到它卡住时,请返回到终端,它应该显示gradle下载的进度。

First time, It take time because it downloads all the artifact that are required by your project. 第一次,这需要时间,因为它会下载项目所需的所有工件。 Internet speed may be the reason. 互联网速度可能是原因。


Try this on Mac : 在Mac上尝试:

From your HomeScreen of Android Studio 从Android Studio的主屏幕

Android Studio -> preference -> Build, Execution, Deployment -> Build Tools -> Gradle Android Studio-> preference -> Build, Execution, Deployment -> Build Tools -> Gradle

Check the 'Offline work' under 'Global Gradle settings' 检查“全局Gradle设置”下的“离线工作”

It will make the gradle build 90% faster. 它将使gradle的构建速度提高90%。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM