UE 4.27.2 - How to build for target SDK 33 (or 34) !

For those who set targetsdk to 34 and face this error (my UE version 4.26.1): Android Gradle build error “AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon.”

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

To link with sdk34, you actually need to compile with sdk 33 (Not sure if its a bug or not)

You should modify UEDeployAndroid.cs to make string CompileSDKVersion = “33”, either this hard coded way. Or make a new ini in Default Engine.ini [/Script/AndroidRuntimeSettings.AndroidRuntimeSettings] to set this a compile skd version, and read it in C# code.

1 Like