I have a problem when using ndk in Android
First, I have MainActivity class / A & B classes In native-lib.cpp, I implemented two functions which will be used in A / B classes as follows.
=========================================
extern "C"{
int Java_packagename_A_Afunc();
double Java_packagename_B_Bfunc();}
=========================================
Also, in both A and B classes, library is set and functions are declared as follows.
=========================================
class A:
static { System.loadLibrary("native-lib"); }
public native double A();
class B:
static { System.loadLibrary("native-lib"); }
public native double B();
=========================================
However, when I run this program, I abruptly stopped. Also, in native-lib.cpp, although I used the functions in two classes, following message is appeared when the cursor is positioned on the name of function.
=========================================
Function 'Java_packagename_A_Afunc' is never used
Function 'Java_packagename_B_Bfunc' is never used
=========================================
What's wrong in my program code?