Unsatisfiedlinkerror: Native Method Not Found - Android
I am developing an android app using C++ code. Trying to use JNI but failed. The code in myFirstApp.cpp JNIEXPORT jint JNICALL Java_com_example_myfirstapp_CreateApp_findMarkersNati
Solution 1:
Your definitions seem correct. According to several similar posts, it may be because of C / C++ name mangling. Try surrounding your methods, around where this API is defined with
extern "C" { }
for example:
extern "C" {
JNIEXPORT jint JNICALL Java_com_example_myfirstapp_CreateApp_findMarkersNative(JNIEnv* env, jobject, jlong addrRgba)
{
... function code ...
}
}
Source: Unsatisfied link error
Post a Comment for "Unsatisfiedlinkerror: Native Method Not Found - Android"