thangkho opened a new issue, #1691:
URL: https://github.com/apache/cordova-android/issues/1691

   I create new project and add android platform. When I run 'sudo cordova 
build android' it build FAILED
   ```
   v002391@V002391s-Mac-mini hello % sudo cordova build android
   Password:
   Checking Java JDK and Android SDK versions
   ANDROID_HOME=undefined (recommended setting)
   ANDROID_SDK_ROOT=undefined (DEPRECATED)
   Using Android SDK: /opt/homebrew/Caskroom/android-platform-tools/33.0.3
   Subproject Path: CordovaLib
   Subproject Path: app
   Starting a Gradle Daemon (subsequent builds will be faster)
   
   FAILURE: Build failed with an exception.
   
   * Where:
   Script 
'/Users/v002024/Documents/cordova/hello/platforms/android/CordovaLib/cordova.gradle'
 line: 69
   
   * What went wrong:
   A problem occurred evaluating script.
   > No installed build tools found. Please install the Android build tools 
version 33.0.2.
   
   * 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
   
   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 3s
   ``` 
   I flow https://github.com/apache/cordova-android/issues/1613 and add 
JAVA_HOME, ANDROID_HOME, ANDROID_SDK_ROOT into zshrc
   export PATH="/Users/v002024/FlutterDev/flutter/bin:$PATH"
   export PATH="$PATH":"$HOME/.pub-cache/bin"
   export 
JAVA_HOME="/Users/v002024/Library/Java/JavaVirtualMachines/jdk1.8.0_381.jdk/Contents/Home"
   export ANDROID_HOME=/Users/v002024/Library/Android/sdk
   export ANDROID_SDK_ROOT=$ANDROID_HOME
   
   export PATH=$PATH:$ANDROID_HOME/platform-tools
   export PATH=$PATH:$ANDROID_HOME/tools
   export PATH=$PATH:$ANDROID_HOME/tools/bin
   export PATH=$PATH:$ANDROID_HOME/emulator
   
   When I check ANDROID_HOME and ANDROID_SDK_ROOT it return same value
   ```
   Mac-mini hello % echo $ANDROID_HOME
   /Users/v002024/Library/Android/sdk
   Mac-mini hello % echo $ANDROID_SDK_ROOT
   /Users/v002024/Library/Android/sdk
   
   ```
   In Android Studio I have Android SDK Location and build tools
   
   ![Screenshot 2024-01-16 at 17 29 
05](https://github.com/apache/cordova-android/assets/11971967/83c1a819-9168-42d3-a545-6258ed130e9a)
   
   I check in build-tools folder, 30.0.2 already:
   
   ![Screenshot 2024-01-16 at 16 08 
04](https://github.com/apache/cordova-android/assets/11971967/c6f4a7fc-7375-4fd8-a0cc-d6cf6543d128)
   When I run cordova requirements, it's ok
   
   ![Screenshot 2024-01-16 at 17 31 
21](https://github.com/apache/cordova-android/assets/11971967/f3cf7fc1-2685-485f-9012-575738e71d8a)
   
   I use cordova 12.0.0 (cordova-lib@12.0.1)
   
   Please help me fix it!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to