apache / cordova-android

Apache Cordova Android
https://cordova.apache.org/
Apache License 2.0
3.59k stars 1.52k forks source link

cordova-android build tools not found issue #1613

Closed RN-programmer closed 8 months ago

RN-programmer commented 12 months ago

I'm using cordova-android@11.0.0 in mac machine.

When I tries to build the app , it keep saying :

*** What went wrong: A problem occurred evaluating script.

No installed build tools found. Please install the Android build tools version 32.0.0.**

When I checked in android studio, it shows build tools 32.0.0 as installed. I have checked in bash profile , there also I'm seeing the paths set .

breautek commented 12 months ago

Here are some things you can check...

  1. Ensure ANDROID_HOME and ANDROID_SDK_ROOT variables are the same. ANDROID_SDK_ROOT is deprecated but some tools may look for it over ANDROID_HOME. They both should point to the same value, and the path should point to the root of the Android SDK directory (should have platforms, platform-tools, build-tools, etc)

To ensure both android home variables are consistently set you can do something like:

export ANDROID_HOME="/path/to/android/sdk"
export ANDROID_SDK_ROOT=$ANDROID_HOME
  1. Ensure that $ANDROID_HOME/build-tools/32.0.0 actually exists. If it shows that its installed in Android Studio's SDK Manager but is missing in$ANDROID_HOME/build-tools` then perhaps you have multiple android SDK installs.

  2. Check that your $ANDROID_HOME is set to the same path as shown in Android Studio -> Settings -> Appearance & Behaviour -> System Settings -> Android SDK

At the end of the day, the tools aren't finding the build tools and there is a reason for it... we just need to find out what that reason is.

breautek commented 8 months ago

Closing as stale / no response.

PATELNAMRATA commented 3 months ago

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 13s Command failed with exit code 1: D:\Namrata\WorkSpace\Cordova-Namrata\Cordova-12\Sk-Mobile-App\sk-launcher-app\platforms\android\gradlew -b D:\Namrata\WorkSpace\Cordova-Namrata\Cordova-12\Sk-Mobile-App\sk-launcher-app\platforms\android\build.gradle cdvBuildDebug