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");
}
输出: “无法获得ownClass”
两个类都在同一个“样本”包中。