3

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.

R. Richards
  • 24,603
  • 10
  • 64
  • 64
  • Possible duplicate of [ionic build Android | error: No installed build tools found. Please install the Android build tools](https://stackoverflow.com/questions/31190355/ionic-build-android-error-no-installed-build-tools-found-please-install-the) – ʍѳђઽ૯ท Sep 24 '18 at 11:32

5 Answers5

1

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.

jonesy827
  • 302
  • 3
  • 11
1

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

Sorin Veștemean
  • 1,772
  • 19
  • 17
0

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.

ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108
0

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.

0

I fixed it by

export ANDROID_HOME=~/Android/Sdk
gal007
  • 6,911
  • 8
  • 47
  • 70
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/26647945) – Ritt Jul 12 '20 at 03:57
  • @Ritesh this is how I solved the same mroblem. Just sharing a possible solution. – gal007 Jul 13 '20 at 05:02