Android Studio Gradle not Building Project

2019-04-28 12:40发布

问题:

I was using my android Studio very well. I don't know what happened and now I am getting only Building "xxxx" Gradle project info whenever I want to create my new project. I am unable to open any new project. Please help. I don't have even 10 reputations to upload the screenshot.

I think my Gradle is not working. How can I reset or restart my Gradle ?

回答1:

I think you have updated your gradle build tool. Go to file>setting>build,execution deployment> gradle> check your gradle tool version



回答2:

Add this line

File -> Settings -> Compiler -> Gradle -> VM Options: -Xmx256m



回答3:

I was failing a class because of this issue. I solved it by

1) Do not delete the Android Studio Version You Downloaded, Leave it intact 2) Google search an older version of Android Studio, in my case, 2.1.1 3) Download it and install, CHOOSE CUSTOM INSTALL 4) A message should appear saying approximately "Another version of Android Studio has been discovered, the installer will only download the missing files" 5) Confirm by starting a new project



回答4:

I had many hours trying to figure this out.

I have followed just about every Stack-overflow article on the issue.

The cause for me was my Anti-virus and Firewall settings. I turned these off, and restarted my Android Studio opened my application I was trying to build it all downloaded what it needed and sync'd nicely. Problem solved, relief as I have been literally days on this.



回答5:

I faced the same problem. Had to wait for 30 minutes for the project to built. But then it was working properly again. So maybe waiting is a solution.