I am trying to build a cordova android app in a macbook air m1 and I'm getting the "No installed build tools found" error, but build-tools are properly installed. I'm completely lost as I'm new on macos and never had this issue in linux. I'd be glad if someone could help. The error output is:
cordova build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/Users/aurumque/Library/Android/sdk (recommended setting)
ANDROID_HOME=/Users/aurumque/Library/Android/sdk (DEPRECATED)
Using Android SDK: /Users/aurumque/Library/Android/sdk
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Script '/Users/aurumque/Library/Mobile Documents/com~apple~CloudDocs/www/cordova/tuteacuatro/platforms/android/CordovaLib/cordova.gradle' line: 64
* What went wrong:
A problem occurred evaluating project ':app'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 349ms
Command failed with exit code 1: /Users/aurumque/Library/Mobile Documents/com~apple~CloudDocs/www/cordova/tuteacuatro/platforms/android/gradlew cdvBuildDebug -b /Users/aurumque/Library/Mobile Documents/com~apple~CloudDocs/www/cordova/tuteacuatro/platforms/android/build.gradle
And this is my ~/.zprofile:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
export ANDROID_SDK_ROOT=/Users/aurumque/Library/Android/sdk
export ANDROID_HOME=/Users/aurumque/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Thank you all