This is the most common errors that we see in Android Studio and very often it is easy to fix.
Just follow these simple steps
- File -> Invalidate caches / Restart
- Shutdown Android Studio
- Rename/remove .gradle folder in the user home directory
- Restart Android Studio let it download all the Gradle stuff it needs
- Gradle build success should come(Make sure you are not behind any proxy).
- Rebuild project!
Try it, it should work…
What do you mean by ‘.gradle’ folder?
Do you mean “C:\Program Files\Android\Android Studio\gradle” this folder in my directory?
It is about 140 MB of files, I want to know if its safe deleting this load of data?
Just wanted to save the hassle of reinstalling the whole Software in case it gets messed up..
Ujjwol
.gradle is a hidden file, not this one C:\Program Files\Android\Android Studio\gradle.
Unhide all hidden folders and you will see.
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.2/userguide/gradle_daemon.html
Please read the following process output to find out more:
———————–
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: –Xmx512m
this one popped up
Please close all applications using java and then try deleting .gradle folder. Reinstalling gradle will bring back the folder, so don’t worry.
The problem is not resolved
alex, what is the error showing in studio now.