I am using mupdf to open a pdf file in my android app.The app crashes with this error.
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "atof" referenced by "libmupdf_java.so"...
This is my java code for viewing the pdf file.
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
RelativeLayout layout = (RelativeLayout) findViewById(R.id.main_layout);
MuPDFCore core = null;
try {
core = new MuPDFCore(this,"/storage/emulated/0/Download/Metamorphosis-jackson.pdf");
} catch (Exception e) {
e.printStackTrace();
}
MuPDFReaderView reader = new MuPDFReaderView(this);
reader.setAdapter(new MuPDFPageAdapter(this, new FilePicker.FilePickerSupport() {
@Override
public void performPickFor(FilePicker filePicker) {
}
}, core ));
layout.addView(reader);
}
}
The code crashes at this particular line.
core = new MuPDFCore(this,"/storage/emulated/0/Download/Metamorphosis-jackson.pdf");
This is the error log:-
07-13 10:40:34.299 7115-7115/com.androidnewbee.www.shatayushiapp E/AndroidRuntime: FATAL EXCEPTION: main Process: com.androidnewbee.www.shatayushiapp, PID: 7115 java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "atof" referenced by "libmupdf_java.so"... at java.lang.Runtime.loadLibrary(Runtime.java:364) at java.lang.System.loadLibrary(System.java:526) at com.artifex.mupdfdemo.MuPDFCore.(MuPDFCore.java:15) at com.androidnewbee.www.shatayushiapp.MainActivity.onCreate(MainActivity.java:23) at android.app.Activity.performCreate(Activity.java:5301) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2291) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2378) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5433) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method)
Also I would like to know how I can display all the pdf files in a list and allow the user to select from the files to view using mupdf. I am new to programming so any help or suggestion is welcome.