Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17084

[Solved] Android Studio didn't recognize jni function from c++

$
0
0

@nbtthief wrote:

Hi everyone,

I'm trying to use java to call C++ function, i follow online tuts using JNIEXPORT void JNICALL Java_org_cocos2dx_cpp_AppActivity_FunctionName.

But when i map it to android it said "Cannot resolve corresponding JNI...", i try to run it, it crashes.
According to my understands, the cause is it cannot regconize the new file i added (i added new file with name AndroidHelper.cpp and added it to android.mk, rebuild with cocos console).

Do you know how to solve this problem?

edit: i added extern "C" in JNI function, fyi

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>