Android Question Error in PDFVieewer Library

AlpVir

Well-Known Member
Licensed User
Longtime User
This code works perfectly with Android 5 and uses the PDFViewer 1.5 library.
B4X:
ub Globals
Dim pdfV  As PDFViewer


Sub Activity_Create(FirstTime As Boolean
PanelPDF.Initialize("PanelPDF")
PanelPDF.color=Colors.White
Activity.AddView(PanelPDF,0,0,100%x,100%y-25dip

pdfV.init
PanelPDF.AddView(pdfV,0,0,-1,-1)

With Android 6 the pdfV.init line causes an error
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/alpvir.firmatablet2-1/lib/arm/libpdfview2.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at de.donmanfred.pdfviewerwrapper.init(pdfviewerwrapper.java:104)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262)
at alpvir.firmatablet2.main._crea(main.java:845)
at alpvir.firmatablet2.main$ResumableSub_Activity_Create.resume(main.java:786)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Error occurred on line: 301 (Main)
java.lang.Exception: array not expected...
[/CODE]
 

DonManfred

Expert
Licensed User
Longtime User
Which library exactly you are using?

I suggest to use this one as it is Compatible with 64bit requirement.
 
Last edited:
Upvote 0
Top