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

#1

Please help,
my new error

C:\Users\Chit Oo Naung\Desktop\myApp>ionic cordova build android
Running app-scripts build: --iscordovaserve --externalIpRequired --nobrowser

[11:23:38] build dev started …
[11:23:38] clean started …
[11:23:38] clean finished in less than 1 ms
[11:23:38] copy started …
[11:23:38] transpile started …
[11:23:45] transpile finished in 7.50 s
[11:23:45] preprocess started …
[11:23:45] deeplinks started …
[11:23:45] deeplinks finished in 31 ms
[11:23:45] preprocess finished in 31 ms
[11:23:45] webpack started …
[11:23:46] copy finished in 8.14 s
[11:24:11] webpack finished in 25.49 s
[11:24:11] sass started …
[11:24:15] sass finished in 4.62 s
[11:24:15] postprocess started …
[11:24:15] postprocess finished in 39 ms
[11:24:15] lint started …
[11:24:15] build dev finished in 37.81 s

cordova build android

  • Running command [11:24:23] lint finished in 7.68 s
    :heavy_multiplication_x: Running command - failed!

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build android (exit code 1):

    (truncated) ... ion.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:161)
    at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:158)
    at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
    at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at
    org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
    at
    org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
    at
    org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)
    at
    org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at
    org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

    FAILURE: Build failed with an exception.

    * Where:
    Script 'C:\Users\Chit Oo Naung\Desktop\myApp\platforms\android\CordovaLib\cordova.gradle' line: 64

    * What went wrong:
    A problem occurred evaluating root project 'android'.
    > 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.
How to build Ionic for android?
#2

Did you?

Run ionic cordova requirements please.

#3

C:\Users\Chit Oo Naung\Desktop\myApp>ionic cordova requirements
[ERROR] Unable to find command: cordova requirements

#4

ionic info then first. Are you on an old CLI?

#5

C:\Users\Chit Oo Naung\Desktop\myApp>ionic info

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : android 6.2.3
Ionic Framework                 : ionic-angular 3.4.2

System:

Node       : v6.10.3
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.10
#6

Uh, strange. Use cordova requirements then.

#7

C:\Users\Chit Oo Naung\Desktop\myApp>cordova requirements

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
cmd: Command failed with exit code 1 Error output:
‘android’ is not recognized as an internal or external command,
operable program or batch file.
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle
Error: Some of requirements check failed

#8

Fix that. Easiest way is to install Android Studio.

#9

Thanks!
I’ll try that.

#11

Open a new topic and inlcude all your information: ionic info, cordova requirements, your exact error etc.

#12

I din get the solution stilll

#13

I have solved it by setting the ANDROID_HOME env var, the default path that ionic tried to use was not correct. For me on a Mac it was:
/Users/MY_USERNAME/Library/Android/sdk

1 Like
#14

open android studio install the virtual device with api level 26 and restart the PC

#15

i got solution for this

install sdk manger https://dl.google.com/android/installer_r24.4.1-windows.exe

and install android build tools

thanks