Recently my android studio got stuck in gradle building very frequently, as shown in the picture above, which already took 30m to run and still keeps running. The only way to finish it is just force to stop android studio and restart the computer. Is there any way to solve this problem? Thanks for any idea!
Related
I am having some trouble with Android Studio and flutter. Every time I make a change in the pubspec.yaml file of my flutter app and save the change, then run my app in my phone, my computer gets stuck while building the app.
Its stucks while running gradle -> Running Gradle task 'assembleDebug'...
I am forced to restart my laptop and then run AS again. The app will now run in my phone but anytime I open pubspec.yaml and make some dependency changes, then my computer will get stuck again and I have to restart again.
Below are some details that might be helpful.
I had tried the same with Ubuntu 18 and I was still getting a similar challenge.
How do I resolve this?
The solution was to change the Operating System and reinstall it again afresh. I did not manage to get a simpler solution
I finished creating my game and when tried to build it for android, every time I build it the build process freezes for hours and nothing happens, even unity stops responding to me, so I kill it from taskmng... it works fine for windows but can't build for andriod, anyway I tried to re-install unity and update it(to 2018.2.10f1 (personal)) but it still doesn't work. And I'm not ready to re-download the SDK with all that size....
Edit: I solved the problem... As I thought, the problem was related to the Android SDK... So unfortunately I had to re download it from zero
I solved the problem...
As I thought, the problem was related to the Android SDK... So unfortunately I had to re download it from zero
I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.
For 2 days I can't start coding my first android app, because of an issue with Android Studio 2.3.1.
There is many discussions about that out there, but non of them helped me so far.
I'm not able to use Run button for my app or even to edit the main_activity.xml file in the program window. Also the following error occurs when Android Studio starts running.
Screen shot of the error:
I'm workin' on Windows 7, 64bit, 8gb RAM, Java 1.8.0.121. Installed Android Studio 2.3.1 using android-studio-bundle-162.3871768-windows.exe file with no custom settings.
To solve the problem I've tried:
reinstall Android Studio
remove .gradle catalog
use File>>Invalidate Crashes/Restart
nothing helps.
Problem solved!
In my particular case the problem was caused by uncomplete Android Studio installation.
The reason of such an installation was Comodo AntiVirus
I noticed that there was some .bat files blocked during the installation. Comodo doesn't inform about it, but you can check it on blocked features list.
So I removed completely Android Studio, turned off all blocking functions in Comodo and quited it. Then installed AS once again.
Now it works fine. Ad least so far... Luckilly there's no Gradle error, so I hope there won't occur further problems.
Hope that this tip's gonna be helpful to somebody.
Have a good day folks!
I have my android studio on a external hard drive and awhile ago I got "Error:Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)" after killing android studios with the task manager. I could not figure out how to fix the problem so I just switched laptops which fixed the problem. Now android froze on me and I was forced to kill it through task manager again. Now I am getting the same error. The answers on the internet seem vary vague and or not solutions for a beginner like myself.
I fixed it by adding "org.gradle.daemon=false" into my «USER_HOME»/.gradle/gradle.properties, where «USER_HOME» is the home directory.
Just close all the instances of Android Studio and restart your project, it will figure out as it may be because of memory issue.
Try this it worked for me
org.gradle.daemon=true
I had the same error.
Adding org.gradle.daemon=false (or true) to gradle.properties didn't help.
I changed "home user directory for gradle" in Android studio settings to other (new) directory. After that "Sync project" and Gradle started and synced successfully.