As you guys might have also got the notice that new apps must target sdk 33.
I had been banging my head since the past 6 hours playing with gradle versions, aapt2, etc to no avail.
Finally found a viable solution! Steps:
1. In The SDK Manager:
Install API 33 (you can have others as well, but this is important):
Install build tools 30.0.3 (donât install any version higher than this, UE4 uses the latest installed version !):
Install ndk 21.4.7075529:
install command line tools 11 (latest for now):
2. In The Unreal Engine Settings:
Make sure to set all 3 of these exactly the same. I am using jdk8 (aka 1.8) which comes default shipped with Android Studio 4.0.0. It is also recommended to use this exact version of studio in the official 4.27 docs. I have not test a higher java version than 8 so I wouldnât recommend it:
2. Modify an engine file:
Edit WebViewControl.java in:
[YOUR UNREAL ENGINE INSTALL DIRECTORY]\Engine\Build\Android\Java\src\com\epicgames\ue4\WebViewControl.java
comment out (or remove) these 3 lines:
viewer.getSettings().setAppCacheMaxSize(1024*1024*8);
viewer.getSettings().setAppCachePath("/data/data/com.your.package.appname/cache"ââ);
viewer.getSettings().setAppCacheEnabled(true);
3. last but not least
Delete these folders:
C:\Users\[YOUR_USERNAME]\.gradle
[YOUR_PROJECT_DIRECTORY]\DerivedDataCache
[YOUR_PROJECT_DIRECTORY]\Intermediate
[YOUR_PROJECT_DIRECTORY]\Saved
Restart engine and build !