Hi everyone,
When packaging for Android on UE5.3 there are no errors.
When packaging for Android on UE5.4 it fails with errors in GameActivity.java:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Z:\app\src\main\java\com\epicgames\unreal\GameActivity.java:782: error: cannot find symbol
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): activityContext.runOnUiThread(new Runnable()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): symbol: method runOnUiThread(<anonymous Runnable>)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): location: variable activityContext of type ContextWrapper
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Z:\app\src\main\java\com\epicgames\unreal\GameActivity.java:1061: error: cannot find symbol
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): activityContext.runOnUiThread(new Runnable()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): symbol: method runOnUiThread(<anonymous Runnable>)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): location: variable activityContext of type ContextWrapper
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Z:\app\src\main\java\com\epicgames\unreal\GameActivity.java:1086: error: cannot find symbol
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): activityContext.runOnUiThread(new Runnable()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): symbol: method runOnUiThread(<anonymous Runnable>)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): location: variable activityContext of type ContextWrapper
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Z:\app\src\main\java\com\epicgames\unreal\GameActivity.java:1152: error: cannot find symbol
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): activityContext.runOnUiThread(new Runnable()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): symbol: method runOnUiThread(<anonymous Runnable>)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): location: variable activityContext of type ContextWrapper
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Z:\app\src\main\java\com\epicgames\unreal\GameActivity.java:1173: error: cannot find symbol
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): activityContext.runOnUiThread(new Runnable()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): symbol: method runOnUiThread(<anonymous Runnable>)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): location: variable activityContext of type ContextWrapper
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Z:\app\src\main\java\com\epicgames\unreal\GameActivity.java:1193: error: cannot find symbol
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): activityContext.runOnUiThread(new Runnable()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): symbol: method runOnUiThread(<anonymous Runnable>)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): location: variable activityContext of type ContextWrapper
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Z:\app\src\main\java\com\epicgames\unreal\GameActivity.java:1235: error: cannot find symbol
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): activityContext.runOnUiThread(new Runnable()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): symbol: method runOnUiThread(<anonymous Runnable>)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): location: variable activityContext of type ContextWrapper
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Note: Some input files use or override a deprecated API.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Note: Recompile with -Xlint:deprecation for details.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): 7 errors
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): > Task :app:compileReleaseJavaWithJavac FAILED
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): 69 actionable tasks: 69 executed
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): * What went wrong:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Execution failed for task ':app:compileReleaseJavaWithJavac'.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): > Compilation failed; see the compiler error output for details.
I have a C++ project, so when I comment out the following lines from .Target.cs it works without errors but there is no AdMob support:
if (Target.Platform == UnrealTargetPlatform.Android)
{
ExtraModuleNames.Add("OnlineSubsystemGooglePlay");
ExtraModuleNames.Add("OnlineSubsystem");
ExtraModuleNames.Add("AndroidAdvertising");
}
Does anyone have any idea how to package for Android on UE5.4, with AdMob support?
Thanks.