I only open simple project and recieve error "Gradle sync failed: Illegal Capacity: -182931123"
Then open Android Studio and go to File > Settings > Build, Execution and Deployment > Gradle > Use Gradle from > Set the path of the downloaded Gradle. Step 4. Now try syncing the Gradle again and check if the error still persists.
In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.
It seems that deleting /home/<user>/.gradle/daemon/4.1/registry.bin
and /home/<user>/.gradle/daemon/4.1/registry.bin.lock
solved in my case.
I just upgraded Android Studio to 3.0 and gradle accordingly, on Ubuntu 17.04.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With