Hello fellow Unreal Engine developers!
I recently encountered an issue while building my Android game for Target SDK 33 using Unreal Engine 4.27. I received an error during the packaging process, specifically related to the WebViewControl.java file. The error message indicated that certain methods, such as setAppCacheMaxSize, setAppCachePath, and setAppCacheEnabled, could not be found in the WebSettings class.
Error Log:
Z:\app\src\main\java\com\epicgames\ue4\WebViewControl.java:122: error: cannot find symbol UATHelper: Packaging (Android (ETC2)): webView.getSettings().setAppCacheMaxSize( 10 * 1024 * 1024 ); UATHelper: Packaging (Android (ETC2)): ^ UATHelper: Packaging (Android (ETC2)): symbol: method setAppCacheMaxSize(int) UATHelper: Packaging (Android (ETC2)): location: class WebSettings UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4\WebViewControl.java:123: error: cannot find symbol UATHelper: Packaging (Android (ETC2)): webView.getSettings().setAppCachePath(GameActivity._activity.getApplicationContext().getCacheDir().getAbsolutePath() ); UATHelper: Packaging (Android (ETC2)): ^ UATHelper: Packaging (Android (ETC2)): symbol: method setAppCachePath(String) UATHelper: Packaging (Android (ETC2)): location: class WebSettings UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4\WebViewControl.java:125: error: cannot find symbol UATHelper: Packaging (Android (ETC2)): webView.getSettings().setAppCacheEnabled( true ); UATHelper: Packaging (Android (ETC2)): ^ UATHelper: Packaging (Android (ETC2)): symbol: method setAppCacheEnabled(boolean)
Upon researching the issue, I discovered that these functions have been removed. To resolve the problem, I opened the Gradle project located at “Project’s Intermediate/Android/gradle” in Android Studio. In the WebViewControl.java file, I removed the problematic lines and added “webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);” instead. This fixed the initial packaging error.
However, a new issue arose after launching the game. The game crashes shortly after showing the launch screen image. Upon further investigation using Android Studio’s debugger, I found the following error:
“E/FBI: Can’t load library: dlopen failed: library “libmagtsync.so” not found”.
At this point, I am seeking your assistance. Could you please help me understand how to fix this “libmagtsync.so” error? Alternatively, if you know of any other solutions for working with Target SDK 33, I would greatly appreciate your input.
Some Screenshots:
ANDROID PACKAGING SETTINGS:
ANDROID SDK :
ANDROID SDK IN ANDROID STUDIO:
Thank you in advance for your help and suggestions!