0

My main dev computer needs to be rebuilt, so before I did that I installed my entire cordova environment on another system, once I rebuild the dev computer then I will be upgrading everything. But on the new computer I keep getting the following error:

> cordova.cmd build android
cordova-custom-config: Skipping auto-restore of config file backup(s)
cordova-custom-config: Applied custom config from config.xml to c:\Users\rolin\dev\AttendaGo\platforms\android\app\src\main\AndroidManifest.xml
cordova-plugin-firebasex: Preparing Firebase on Android
Checking Java JDK and Android SDK versions
ANDROID_HOME=%ANDROID_SDK_ROOT (recommended setting)
ANDROID_SDK_ROOT=C:\Users\rolin\AppData\Local\Android\sdk (DEPRECATED)
Using Android SDK: C:\Users\rolin\AppData\Local\Android\sdk
Subproject Path: CordovaLib
Subproject Path: app

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\rolin\dev\AttendaGo\platforms\android\CordovaLib\cordova.gradle' line: 75

* What went wrong:
A problem occurred evaluating script.
> No usable Android build tools found. Highest 32.x installed version is 28.0.2; Recommended version is 32.0.0.

The only difference between the two environments is this:

  • Dev Computer: Android Studio 2020.3.1 arctic fox
  • New Computer: Android Stduio 2024.3.2 Meerkat Feature Drop

I have searched through multiple SO posts of similar issue and none of the answers worked for me.

Cordova Cli - No usable Android build tools found

"cordova build android" fails with "no installed build tools found"

Path issue? Cordova - No installed build tools found. Please install the Android build tools version

....and more.

I compared my environment variables to my original dev system and they are all the same. I even tried to pin the environment variable for build-tools straight to 35.0.1 - but still get the same error. Its like something has permanently pinned the app to build tools 28.0.2.

Attached are screenshots of my environment variables and Android Studio SDK Manager

enter image description here enter image description here enter image description here enter image description here

1
  • According to your screenshots you have installed "Android SDK Build-Tools 36" which may be too new for Cordova. Enable "Show Package Details" and install version 32.0.0 of Android SDK Build-Tools 36 that should be the one Cordova mentions. Commented Jun 21 at 13:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.