Closed sepyeight closed 3 years ago
DvmObject result = dvmClass.callStaticJniMethodObject(emulator, "Java_com_example_nativetest_MainActivity_stringFromJNI(Landroid/content/Context;)Ljava/lang/String"); 这一行改成 DvmObject result = dvmClass.callStaticJniMethodObject(emulator, "Java_com_example_nativetest_MainActivity_stringFromJNI(Landroid/content/Context;)Ljava/lang/String", vm.resolveClass("android/content/Context").newObject(null));
另外: dvmClass = vm.resolveClass(className);这里的className为com/example/nativetest/MainActivity,再调用callStaticJniMethodObject的时候,方法名为stringFromJNI
改了代码忘了加参数了,谢谢大佬
log日志
trace后发现应该是CallObjectMethodV报错了 so文件是一个自己写的demo
调试了一下午,不确定具体哪里出了问题,大佬可以看看吗? 调用使用的java脚本