Android NDK - JNI findClass returns null
ownClass = (*jniEnv)->FindClass(jniEnv, "com/sample/TestClass");
if(!ownClass )
{
LOGD("Failed to get ownClass");
}
activityClass = (*jniEnv)->FindClass(jniEnv, "com/sample/MainActivity");
if(!activityClass)
{
LOGD("Failed to get activityClass");
}
Conclusion: "Failed to get own class"
Both classes are in the same sample package.
+3
source to share
No one has answered this question yet
Check out similar questions: