Android builds do not work anymore

Update:

After struggling non-stop with this issue for over 6 months, having completely given up on android development, and having the issue persist no matter what I did, I finally figured out the issue.

Now, this may not work for you, but it definitely worked for me and it is rather simple:
Disable your antivirus.

I was using Windows Defender, the stock antivirus in Win10, although even if you are using a different antivirus I would greatly recommend trying to build with it disabled.

If that does not work, some other solutions I’ve seen include:

SOLUTION 1
Deleting the Intermediate, Saved, and DerivedDataCache folders from your project, then delete the .gradle folder in your user folder (looks something like C:/Users/{YOURUSERNAME}/.gradle where {YOURUSERNAME} is the account name you use for signing in to your PC.)
Then Rebuild.

SOLUTION 2
Opening Android Studio and on the welcome menu, go down to configure, click SDK Manager, and select everything above Android 4.3 (Jellybean) API level 18, Then click Apply, and then OK once the install is finished.
Then Rebuild.

SOLUTION 3
Generate a new key with JDK using the following tutorial:
Error cmd.exe failed with args - YouTube
Then Rebuild.

And finally,
If all else fails,
Try reinstalling all of the android stuff. Sometimes something might just goof itself up in the installation process and this if you do it in the exact same order as This Documentation Tutorial, it should hopefully work.

Cheers!

8 Likes