For context I use Cordova.
I have installed build tools 33.0.0 from Android Studio, Gradle version 7.6 and changed my environment variables. My Gradle is located at C:\gradle.
I have gone into the 7.6/bin folder and ran gradle.bat, ran the command gradle -v at the command prompt to ensure it is correct,
I changed my config.xml file to say <preference name="android-targetSdkVersion" value="33" /> without the quotes,
I created an emulator that has Tiramisu as System image, and restarted my physical machine.
When I run: cordova platform add [email protected] it build fine with the Android Target SKD: android-33 and Android Compile SDK:33
Here is my plugin list just in case: at.modalog.cordova.plugin.cache 1.1.0 "Cache"
- cordova-plugin-advanced-http 3.3.1 "Advanced HTTP plugin"
- cordova-plugin-camera 6.0.0 "Camera"
- cordova-plugin-device 2.1.0 "Device"
- cordova-plugin-dialogs 2.0.2 "Notification"
- cordova-plugin-file 7.0.0 "File"
- cordova-plugin-firebasex 16.0.0 "Google Firebase Plugin"
- cordova-plugin-native-settings 1.0.0 "NativeSettings"
- cordova-plugin-statusbar 3.0.0 "StatusBar"
- cordova-plugin-x-socialsharing 6.0.4 "SocialSharing"
- es6-promise-plugin 4.2.2 "Promise"
- ionic-plugin-keyboard 2.2.1 "Keyboard"
I tried to run: cordova run android
and I get
C:\Users\*****an\APP_DEV\******_APP\APP>cordova run android
cordova-plugin-firebasex: Preparing Firebase on Android
Checking Java JDK and Android SDK versions
ANDROID_HOME=C:\Users\*****an\AppData\Local\Android\Sdk (recommended setting)
ANDROID_SDK_ROOT=C:\Users\*****an\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Users\*****an\AppData\Local\Android\Sdk
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 SUCCESSFUL in 990ms
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
> Configure project :app
strippedNativeLibsDir is deprecated and no longer used. Please remove it from your build configuration.
> Task :CordovaLib:compileDebugRenderscript
The RenderScript APIs are deprecated. They will be removed in Android Gradle plugin 9.0. See the following link for a guide to migrate from RenderScript: https://developer.android.com/guide/topics/renderscript/migrate
> Task :app:mapDebugSourceSetPaths FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mapDebugSourceSetPaths'.
> Error while evaluating property 'extraGeneratedResDir' of task ':app:mapDebugSourceSetPaths'.
> Failed to calculate the value of task ':app:mapDebugSourceSetPaths' property 'extraGeneratedResDir'.
> Querying the mapped value of provider(java.util.Set) before task ':app:processDebugGoogleServices' has completed is not supported
* 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
11 actionable tasks: 11 executed
Command failed with exit code 1: C:\Users\*****an\APP_DEV\******_APP\APP\platforms\android\gradlew -b C:\Users\*****an\APP_DEV\******_APP\APP\platforms\android\build.gradle cdvBuildDebug
And yes I have tried: gradle --stacktrace and got nowhere trying to do what it "suggests"
I got it all figured out. build tools 32.0.0, gradle 7.6, android-minSdkVersion =24, android-targetSdkVersion =33, android studio version Giraffe 2022.3.1 Patch 1, cordova-plugin-firebasex 16.1.0, emulator made with/ Android 13.0 Google Play
Just in case anyone else ever needs help and uses cordova.