Install the Android build tools version 19.1.0 or higher

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

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

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.

I have error to compile build. :frowning:

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.

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

Please how do you solve it

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

I uninstalled Android Studio, and only have a android_sdk folder with android tools and gradle. Error persists.

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”

ionic info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node  : v8.15.0
npm   : 6.4.1
OS    : macOS
Xcode : Xcode 10.2.1 Build version 10E1001

Environment Variables:
ANDROID_HOME : not set

Misc:

backend : pro

cordova requirements
Android Studio project detected

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
android: Command failed with exit code ENOENT
Gradle: installed /usr/local/Cellar/gradle/5.4.1/bin/gradle
(node:1022) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed