Android SDK 34 Update build issue

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction

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.
while build app with target sdk 34

You need to provide more details like:

  • What version of Cordova are you running
  • What command are you running when this error occurs

I am trying to update target sdk version from 33 to 34.I Executed the command ionic cordova build android

My Environment:
ionic -v - 7.0.2
cordova- v - 12.0.0
node -v - v20.11.1
npm -v -10.8.1
gradle -v -Gradle 8.6
ng --version ’ or ’ ng version ’ or ’ ng v ’ -18.0.6

i got error like A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction

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.
while build app with target sdk 34

1 Like

Checkout this SO post - Android Gradle build error "AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon." - Stack Overflow

I don’t know much about Cordova, but supposedly the latest version (v12) doesn’t yet support SDK 34 - Android Platform Guide - Apache Cordova.

Cordova will not support SDK 34 now Is that correct?

It looks like their documentation is not up-to-date. Looking at their repo, they released v13.0.0 that does support SDK 34 - cordova-android/RELEASENOTES.md at 3503bfa31b10cc7d6948356d4c101c7b76109688 · apache/cordova-android · GitHub

1 Like

The docs are up to date, but you have to check the dev version

https://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html

1 Like