Install the Android build tools version 19.1.0 or higher


#1

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


#2

What’s your actual error? please share your error message here.
Thanks


#3

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

FAILURE: Build failed with an exception.

  • Where:
    Script ‘E:\installed software\firstpro\platforms\android\CordovaLib\cordova.gradle’ line: 68

  • What went wrong:
    A problem occurred evaluating project ‘:CordovaLib’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 3s
(node:2728) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • Where:
    Script ‘E:\installed software\firstpro\platforms\android\CordovaLib\cordova.gradle’ line: 68

  • What went wrong:
    A problem occurred evaluating project ‘:CordovaLib’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

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.


#4

I have error to compile build. :frowning:


#5

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.


#6

thanks for your reply but i just solve problem. i just wrong the android studio path