I don’t why I’m facing this problem. I have installed android studio, Java JDK, but when I try to generate app (Cordova build android) then I face this problem.
I also google it but did not find any correct answer
Android Studio project detected
ANDROID_HOME=C:\Users\Maan\AppData\Local\Android\sdk\tools\android.bat
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
BUILD FAILED in 1m 3s
(node:2728) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I had the same error and I couldn’t find any answer of course I had all the environment variables set but I kept getting this message same as you. So I went to the file “cordova.gradle” on line 68 and I deleted all traces of this function “doFindLatestInstalledBuildTools” in this file and in another one called “build.gradle” and then I ran the command again and it started updating the build tools all on its own and the I got an error message so I went back to those two files and I pasted the lines of code that I cut previously and ran the command another time and finally Build was successful.
I hope this solution works for you too.
I have the same ERROR!
Cordova Requiments: All OK.
Wen I run ionic cordova build android, i get the same error: just like the tittle of this post.
Any Idea??? :S
It gives me problems in the execution of ionic cordova build android
I tried this but it did not work, someone has a better idea
enter here
cd ~ / Library / Android / sdk / tools / bin /
and later
./sdkmanager “build-tools; 27.0.3”
and the version that is asking you
if you get something repositories could not loaded
touch ~ / .android / repositories.cfg
and again
./sdkmanager “build-tools; 27.0.3”