Reputation: 168
While trying to build the ionic app for the android platform I am getting the below error to install Android build tools , But I have configured sdkmanager in my PATH variable and ANDROID_HOME as well. Please help me on this.
System Variables :
%ANDROID_HOME% = K:/android-sdk %PATH% = %APTH%/%ANDROID_HOME%/tools/bin
Output of %ANDROID_HOME%/tools/bin/sdkmanager --list
Available Updates:
ID | Installed | Available
------- | ------- | -------
tools | 26.0.1 | 26.1.1
done
Error :
[21:12:35] lint finished in 4.37 s
× Running command - failed!
[ERROR] An error occurred while running cordova build android (exit code 1):
(truncated) ... eLauncher$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)
FAILURE: Build failed with an exception.
* Where:
Script 'K:\mobileApp\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.
Upvotes: 0
Views: 1643
Reputation: 570
Extend your PATH variable to point to Android Platform Tools ie.
%PATH% = %PATH%/%ANDROID_HOME%/platform-tools
Hopefully this solves your Error !
Upvotes: 1
Reputation: 570
Check you Android Version in your config.xml
It should be something like :
<engine
name="android"
spec="^6.2.3"/>
Upvotes: 1