I\'m new to android development and android studio IDE.
I\'ve checked-out a project from bitbucket and when I try to compile it I get the following error:
I had the same issue
Go to C:\Users\Jesus Navas.gradle\wrapper\dists\gradle-3.3-all(your gradle version).
Erase your current gradle version and write again in cmd "ionic build android".
However, your gradle will download again, then it will unzip it automatically, ready checkout the output .apk,
this solved my issue
I had the same problem, happened after turning on and off jack and jill tool chain. I tried removing .gradle but it didn't help. Removing the build directory inside my project folder resolves the problem.
Try this before removing .gradle as it will need near 200MB worth of download.
Clearing .gradle directory didn't help, but clearing build directory did the job for me.
In recent versions of Android Studio File -> Invalidate Caches / Restart is worth trying.
I also faced the similar issue when imported the existing project into Android Studio, this might happened because of gradle version mismatch between two different Android Studio platform.
Solution(on Mac OS):
I fixed the same issue via the following:
Go to File -> Settings -> Gradle
Input the following in the "Gradle VM options:" box: -XX:MaxHeapSize=256m -Xmx256m
Hit apply and Android Studio should build your project successfully.