FJavaWrapper::FindClass(ENV, "com/epicgames/ue4/GameActivity", false); fails

This worked back in 4.17. I’ve tried several LoadingPhase’s but to no avail.

Why wouldn’t I be able to find the game activity class?

JNIEnv* env = FAndroidApplication::GetJavaEnv();
jclass localGameActivityClass = FJavaWrapper::FindClass(ENV, "com/epicgames/ue4/GameActivity", false);
__android_log_print(ANDROID_LOG_INFO, LOG_TAG, "AndroidCamera: StartupModule - localGameActivityClass: 0x%p", GameActivityClassID);
GameActivityClassID = (jclass)ENV->NewGlobalRef(localGameActivityClass);

Android log output:

05-21 19:40:09.056 15650 15667 I CameraLOG: AndroidCamera: StartupModule
05-21 19:40:09.057 15650 15667 W System.err: java.lang.ClassNotFoundException: Didn't find class "com.epicgames.ue4.GameActivity" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib, /vendor/lib, /system/lib, /vendor/lib]]
05-21 19:40:09.058 15650 15667 W System.err: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
05-21 19:40:09.058 15650 15667 W System.err: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
05-21 19:40:09.058 15650 15667 W System.err: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
05-21 19:40:09.062 15650 15667 D UE4     : Assertion failed: Class != 0 [File:D:\Projects\MM419\Engine\Source\Runtime\Launch\Private\Android\AndroidJNI.cpp] [Line: 182]

And if I do something like the following my function isn’t found:

jclass MainClass = FAndroidApplication::FindJavaClass("com/epicgames/ue4/GameActivity");
	AndroidThunkJava_OpenCameraApp = FJavaWrapper::FindMethod(ENV, MainClass, "AndroidThunkJava_OpenCameraApp", "()V", false);

I also tried searching for the functions in my game instance startup to no avail.

Blah.

To fix another error I converted my AdditionPropertiesFroReceipt to a RuntimeDependencies add. FAIL!

This was needed (it just needed the old ReceiptProperty removed)

string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
AdditionalPropertiesForReceipt.Add(“AndroidPlugin”, Path.Combine(PluginPath, “AndroidImageHandler_APL.xml”));