Skip to content Skip to sidebar Skip to footer

No Implementation Found For Int Com.example.nimashahbazi.mooshak.encryptingactivity.encrypt

I am trying to use a C++ code in an android app but I keep getting this error (no need to mention this is my first time using NDK): com.example.nimashahbazi.mooshak E/art: No imple

Solution 1:

It seems like you are trying to load the wrong library - your Android.mk states your library name is Mooshak (via LOCAL_MODULE), yet you are using System.loadLibrary("native-lib");

You should use: System.loadLibrary("Mooshak"); instead.

Solution 2:

I'm writing this for further similar issues as the accepted answer as Alex has explained in the comments. I had to add "extern C" to the definition of functions in native-lib:

extern"C"
{
JNIEXPORT jint  JNICALL
Java_com_example_nimashahbazi_mooshak_EncryptingActivity_encrypt(JNIEnv *env, jobject obj,
                                                                 jstring encryptionKey,
                                                                 jstring inputFile,
                                                                 jstring outputFile);

JNIEXPORT jint  JNICALL
Java_com_example_nimashahbazi_mooshak_DecryptingActivity_decrypt(JNIEnv *env, jobject obj,
                                                                 jstring encryptionKey,
                                                                 jstring inputFile,
                                                                 jstring outputFile);
}

Post a Comment for "No Implementation Found For Int Com.example.nimashahbazi.mooshak.encryptingactivity.encrypt"