草庐IT

InterfaceJNI

全部标签

c++ - 无法使用 JNI 从 C++ 调用 Java

我有一个使用cocos2d-x库的小项目。我正在尝试使用C++调用Java函数,但我在第11行收到信号异常://GetStatusstatus=jvm->GetEnv((void**)&env,JNI_VERSION_1_6);但我不知道为什么会这样。在我的Java类Getsocial.java中存在这个函数:privatevoidtweet(){Stringscore="123";StringtweetUrl="https://twitter.com/intent/tweet?text=Hello!Ihavejustgot"+score+"pointsinmygameforAndro