Reputation: 71
I am trying to build and generate an apk for my Ionic 4 application. When I attempt to do this, I am met with the following error:
A problem occurred evaluating project ':CordovaLib'.
[cordova] > No installed build tools found. Install the Android build tools version 19.1.0 or higher.
I have looked at many other solutions on Stackoverflow for this problem and nothing has fixed my issue. I have the Android SDK and SDK tools installed through the Android Studio SDK manager.
I have ANDROID_HOME set in both my .bash-profile and Android Studio path variables. Here is what my .bash-profile file looks like, which is where I believe environmental variables are intended to be set?
export ANDROID_HOME=~/Users/zacharyjordan/Library/Android/sdk
export ANDROID_SDK_ROOT=~/Users/zacharyjordan/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
When I attempt to build my application, it doesn't even seem as if Ionic is detecting my updated ANDROID_HOME path. It lists ANDROID_HOME as ANDROID_HOME=/usr/local/Caskroom/android-sdk/4333796
If anyone knows what I can do to get my app to build properly I would greatly appreciate it. No other solutions on Stackoverflow have fixed my problem thus far.
Upvotes: 3
Views: 8579
Reputation: 1920
First of all you get that because of your environment path is not correct.
What worked for me (Windows 10):
open Android Studio -> SDK Manager -> SDK Tools
☐ Hide Obsolete Packages
☑ Show Package Details
From Android SDK Build-Tools list
☑ 29.0.3
Set the PATH for the ANDROID_HOME to YOUR_PATH\sdk
Upvotes: 1
Reputation: 323
I just troubleshooted this error on a coworker's computer and the problem was an environment variable called ANDROID_SDK_HOME
that was set to a different folder (C:\Android
in his case). Changing that variable to match the actual sdk folder fixed the issue.
Upvotes: 1
Reputation: 1
I managed to resolve my issue with the above error by creating 2 environment variables on my OSX machine for ANDROID_HOME this essentially is the same as what you did above but for my paths. (I had not done this prior.)
After that I ran the command sdkmanager "platform-tools" in my cordova projects CLI. I had difficulties resolving this issue before using Android Studios SDK Manager but this method seemed to clear things up.
Note: If build tools cannot be found for your project. It's worth trying sdkmanager "build-tools" in your CLI.
Hope this helps.
Upvotes: 0
Reputation: 16976
I have the Android SDK and SDK tools installed through the Android Studio SDK manager
SDK tools
is different than the build tools
.
Go to SDK manager, download build tools v19.1.0
or higher then error should be gone.
Upvotes: 0