Hello,
I want to run some java code from C++ but every time I search for a java class using env->FindClass the application crashes telling me that the class do not exist. The class exist but somehow the JNIEnv that I get do not have access to the new java classes. How can I fix that?
To get the JNIENv I do the following:
JNIEnv* env = FAndroidApplication::GetJavaEnv();
I’ve also tried the following, but I go the same result:
In my case, the problem was ProGuard tool. ProGuard encrypts names of Java classes to fight against decompilation and hacking. It also affects my normal codes trying to access Java classes. After I disabled ProGuard, the problem was solved.
You can configure ProGuard by editing a text file located in the path below.