Hello team
Google Play Store sent me an email that I need to update my app to API 34 for Google , and the app was not used by me since year now and I changed my PC etc ,
so I have the code now and I changed the API level to 34
<preference name="android-targetSdkVersion" value="34" />
<preference name="android-compileSdkVersion" value="34" />
<preference name="android-buildToolsVersion" value="34.0.0" />
and I have run the following commands :
- npm install
- ionic cordova platform add android@10.1.2
- ionic cordova build android --prod --release
but the last command failing with this error :
> Task :app:bundleReleaseResources FAILED
> Task :app:processReleaseResources FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
> AAPT2 aapt2-4.2.2-7147631-windows Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
* 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:
Execution failed for task ':app:processReleaseResources'.
* 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:
Execution failed for task ':app:processReleaseResources'.
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
Execution failed for task ':app:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> AAPT2 aapt2-4.2.2-7147631-windows Daemon #1: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
* 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.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
49 actionable tasks: 3 executed, 46 up-to-date
anyone knows about this issue please ?
here are the project info :
ionic info
Ionic:
Ionic CLI : 6.20.1 (C:\Users\mehdi\AppData\Roaming\nvm\v14.21.1\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 14.2.13
@angular-devkit/schematics : 14.2.13
@angular/cli : 14.2.13
@ionic/angular-toolkit : 5.0.3
Cordova:
Cordova CLI : 11.1.0
Cordova Platforms : android 10.1.2
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 22 other plugins)
Utility:
cordova-res : 0.15.4
native-run : not installed globally
System:
Android SDK Tools : 26.1.1 (C:\Users\mehdi\AppData\Local\Android\Sdk)
NodeJS : v14.21.1 (C:\Program Files\nodejs\node.exe)
npm : 8.19.4
OS : Windows 10````
npm -v
6.14.17
node -v
v14.21.1
gradle -v
Gradle 6.7.1