I pasted ".so" file into below folders
jniLibs->arm64-v8a
jniLibs->armeabi-v7a
Inside MainActivity. java file I declared
static {
System.loadLibrary("filename");
}
Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);
TextView textView = findViewById(R.id.textView);
try {
textView.setText(METHODNAME("string")+"");
} catch (Exception e) {
Log.i("error", e.message());
}
}
public static native int[] METHODNAME(String strng);
When I run the app it shows below error
java. lang. UnsatisfiedLinkError: No implementation found for int[] com. android. myapp. MainActivity. METHODNAME(java. lang. String)
I'm new to NDK project and couldn't find proper tutorials.
I pass string argument to c++ method parameter and get return value to print in textview. For this I'm doing anything wrong? Thanks!