I'm trying to upgrade my Ionic Android APP with new functionalities but get an error
Run $ ionic cordova build android --prod
cordova build android --release Generating initial manifest for Ionic Deploy... Ionic Deploy initial manifest successfully generated. Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=/albertosanmartinmartinez/Library/Android/sdk/tools/bin/platform-tools/emulator/build-tools/29.0.0-rc2/zipalign (recommended setting) ANDROID_HOME=/Users/albertosanmartinmartinez/Library/Android/sdk (DEPRECATED) Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio [ERROR] An error occurred while running subprocess cordova. cordova build android --release exited with exit code 1.
Run $ brew info gradle
gradle: stable 6.8.1 Open-source build automation tool based on the Groovy and Kotlin DSL https://www.gradle.org/ Not installed From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gradle.rb License: Apache-2.0 ==> Dependencies Required: openjdk ✘ ==> Analytics install: 65,592 (30 days), 151,847 (90 days), 558,625 (365 days) install-on-request: 64,753 (30 days), 150,185 (90 days), 546,096 (365 days) build-error: 0 (30 days)
Reinstall $ brew install gradle
and export it export PATH=$PATH:/usr/local/Cellar/gradle/gradle-7.0.2/bin
And we rerun $ ionic cordova build android --prod
hrow new error
FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:stripDebugDebugSymbols'. No version of NDK matched the requested version 21.0.6113669. Versions available locally: 20.0.5594570 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 7s Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings 38 actionable tasks: 2 executed, 36 up-to-date Command failed with exit code 1: /Users/.../platforms/android/gradlew cdvBuildDebug -b /Users/.../platforms/android/build.gradle
Anybody could help me please ? Thanks in advance.