C++代码里通过JniHelper调用安卓上的java代码,日志里说找不到java class,但是这个类前面刚被成功调用过。
找了半天没有头绪,有点挠头,有人遇到过这种情况吗?
日志:
06-15 1511.311 31237 31283 D JniHelper: JniHelper::getStaticMethodInfo, className=com.game.CallJava, methodName=resetContent, paramCode=()V
06-15 1511.311 31237 31283 D JniHelper: JniHelper::getJavaVM(), pthread_self() = -835851920
06-15 1511.311 31237 31283 D JniHelper: JniHelper::getEnv, env=0xeee33d10
06-15 1511.311 31237 31283 D JniHelper: JniHelper::_getClassID className=com.game.CallJava
06-15 1511.311 31237 31283 D JniHelper: JniHelper::getJavaVM(), pthread_self() = -835851920
06-15 1511.311 31237 31283 D JniHelper: JniHelper::getEnv, env=0xeee33d10
…………
06-15 1511.581 31237 31283 D JniHelper: JniHelper::getStaticMethodInfo, className=com.game.CallJava, methodName=isServiceAvailable, paramCode=()Z
06-15 1511.581 31237 31283 D JniHelper: JniHelper::getJavaVM(), pthread_self() = -835851920
06-15 1511.581 31237 31283 D JniHelper: JniHelper::getEnv, env=0xeee33d10
06-15 1511.581 31237 31283 D JniHelper: JniHelper::_getClassID className=com.game.CallJava
06-15 1511.581 31237 31283 D JniHelper: JniHelper::getJavaVM(), pthread_self() = -835851920
06-15 1511.581 31237 31283 D JniHelper: JniHelper::getEnv, env=0xeee33d10
06-15 1511.581 31237 31283 E JniHelper: Failed to find class com.game.CallJava
06-15 1511.581 31237 31283 E JniHelper: Classloader failed to find class of com.game.CallJava