Reputation: 1813
I am using android studio version 1.2.2 and working on some old project. I keep on getting this message on top of my file as shown in image below, due to which I can't write any code, build apk. I am stuck.
Also in the background, 'refreshing gradle project' process keeps on working.
Please help me out of it!
Error log: see this link for error log file: https://www.dropbox.com/s/4ys2ar83nli6w83/idea.log?dl=0
also, before this error, I got stuck at some other problem as shown in image below. I just got out of it somehow but don't if the issues are correlated or not.
Upvotes: 4
Views: 11279
Reputation: 1907
I had the same issue. It happened when I've done multiple changes in build.gradle and clicked sync. As you might guess due to the amount of changes gradle sync was expected to take some time but in the middle of the sync I've clicked build icon. The build failed with some weird error that I didn't have before and Android Studio stucked the same way as in your case. For me cleaning the project and restarting the Android Studio was enough to get rid of this problem but I was no longer getting gradle popups, so reboot was necessary to fully get rid of this problem.
Upvotes: 0
Reputation: 151
I had simular issue lately where i created a new Kotlin Android project and when selecting the Fragment/Acivity xml-files, i got the same error Gradle project snyc in progress...
(Android Studio Version 4.2.1)
Simply restarting the PC solved the issue for me
Upvotes: 1
Reputation: 62439
Have you tried to delete .gradle
folder from C:\Users\<user>\
Directory.
It will download new gradle package.
Its working for me. May helpful to you also.
Upvotes: 3
Reputation: 15424
This might be because you don't have a reliable fast internet connection! In the first project the project is building ie, it would fetch data from your dependencies in build.gradle
and try to compile and build them before you can work on your project. The more the dependencies in your project, the more time it'd take to build. Although on a fast computer with a fast internet connection, it shouldn't take you more than 10s (on an average sized project).
In the 2nd screenshot, it seems that the Android SDK is being downloaded. That is very important for Android development. You cannot proceed with android development if you dont have the sdk setup.
Both of them are independent problems.
You might want to take a look here.
Upvotes: -2