I use ".so" files in my project but it give following error "java.lang.UnsatisfiedLinkError: No implementation found for Boolean", i already try to recreate ".so" using Cygwin and put it in jniLibs folder and also using create a jar of it, but it gives same error.
But the same ".so" file is working in my existing project. I try so many ways but its not working at all, what can i do ?
com.amaze.filemanager E/art: No implementation found for boolean com.amaze.filemanager.scanner.SignatureLib.InitScanner(java.lang.String, java.lang.String) (tried Java_com_amaze_filemanager_scanner_SignatureLib_InitScanner and Java_com_amaze_filemanager_scanner_SignatureLib_InitScanner__Ljava_lang_String_2Ljava_lang_String_2) 12-19 11:47:07.463 4579-4934/com.amaze.filemanager E/AndroidRuntime: FATAL EXCEPTION: Thread-5230 Process: com.amaze.filemanager, PID: 4579 java.lang.UnsatisfiedLinkError: No implementation found for boolean com.amaze.filemanager.scanner.SignatureLib.InitScanner(java.lang.String, java.lang.String) (tried Java_com_amaze_filemanager_scanner_SignatureLib_InitScanner and Java_com_amaze_filemanager_scanner_SignatureLib_InitScanner__Ljava_lang_String_2Ljava_lang_String_2) at com.amaze.filemanager.scanner.SignatureLib.InitScanner(Native Method) at com.amaze.filemanager.scanner.SignatureLib.InitializeScanner(SignatureLib.java:42) at com.amaze.filemanager.scanner.Signature.(Signature.java:62) at com.amaze.filemanager.ScanForVirusActivity$1.run(ScanForVirusActivity.java:66)
public class SignatureLib {
static {
System.loadLibrary("Signature");
}
SharedPreferencesUtils spu;
Context context;
public SignatureLib(Context context) {
this.context = context;
}
private native boolean InitScanner(String strDBPath, String dbPathTemp);
private native boolean DeInitScanner();
private native String checkVirus(String filepath);
private native boolean UploadFile(String FilePath, String DeviceID, String path);
private native boolean DownloadFile(String FilePath, String DeviceID, String path);
private native boolean IsGameApp(String AppName);
private native boolean SetUpdateInProgressStatus(boolean bStatus);
public boolean InitializeScanner(String strDBPath) {
spu = new SharedPreferencesUtils();
String packageName = context.getPackageName();
String dbPathTemp = "data/data/" + packageName + "/";
return InitScanner(strDBPath, dbPathTemp);
}
}
Yeah, the full stack trace was needed- you broke it off initially in a place that made no sense. What its saying is that your .so file doesn't have an InitScanner function- either you misnamed it in the C file, you got the signature wrong, or it isn't there at all. Or if you used C++, you forgot to extern C the function.