Android Question PdfViewer Log Error

junaidahmed

Well-Known Member
Licensed User
Longtime User
I have used pdfviewer library to view pdf file,When I initialize the pdfviewer,it shows an error message.Please check below log and advise how to solve this issue....


Logger connected to: LENOVO Lenovo A2010-a
--------- beginning of system
--------- beginning of main
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
autoversion: 165.0
compilation time: 02/21/2018 18:22:09
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (entry) Create, isFirst = true **
** Activity (entry) Resume **
copy lib
B4X:
If pdfv.IsInitialized Then pdfv.RemoveView
        pdfv.init
HorizontalScrollView1.Panel.AddView(pdfv, i * ImgThum.Width,10,ImgThum.Width,ImgThum.Height)
            pdfv.getpdf(PicMap.GetValueAt(i)&PicMap.GetKeyAt(i))
            If pdfv.isValid Then
                'Msgbox("Loading pdf file!","Loading")
                pdfv.scrollToPage(0)
                pc=pdfv.GetPageCount
                pdfv.zoom(2.0)
            Else
                Msgbox("Error pdf file!","Error")
                Activity.Finish
                Return
            End If
: dlopen failed: library "/data/data/com.cabinet/files/libpdfview2.so" not found
at java.lang.Runtime.load(Runtime.java:331)
at java.lang.System.load(System.java:981)
at ice.pdfviewer.pdfviewerwrapper.init(pdfviewerwrapper.java:109)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:259)
at com.cabinet.entry._addthumnailimage(entry.java:484)
at com.cabinet.entry._cmdbrowse_click(entry.java:786)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:4848)
at android.view.View$PerformClick.run(View.java:20260)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5624)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
An error occurred:
(Line: 190) StrFile = PicMap.GetKeyAt(i)
java.lang.Exception: array not expected...
 

junaidahmed

Well-Known Member
Licensed User
Longtime User
Thanks Erel ,

its working fine in Android 5.1 Version but when I run the same application in Android 7.1.1 its shows an error message as

Logger connected to: Xiaomi Redmi 4
--------- beginning of system
--------- beginning of main
** Activity (main) Create, isFirst = true **
autoversion: 206.0
compilation time: 02/21/2018 20:09:05
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
copy lib
main_addthumnailimage (java line: 660)
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.cabinet/files/libpdfview2.so" is 32-bit instead of 64-bit
at java.lang.Runtime.load0(Runtime.java:908)
at java.lang.System.load(System.java:1537)
at ice.pdfviewer.pdfviewerwrapper.init(pdfviewerwrapper.java:109)
at com.cabinet.main._addthumnailimage(main.java:660)
at com.cabinet.main._lstreports_itemclick(main.java:1270)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA$1.run(BA.java:325)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6205)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
--------- beginning of crash
main_addthumnailimage (java line: 660)
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.cabinet/files/libpdfview2.so" is 32-bit instead of 64-bit
at java.lang.Runtime.load0(Runtime.java:908)
at java.lang.System.load(System.java:1537)
at ice.pdfviewer.pdfviewerwrapper.init(pdfviewerwrapper.java:109)
at com.cabinet.main._addthumnailimage(main.java:660)
at com.cabinet.main._lstreports_itemclick(main.java:1270)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA$1.run(BA.java:325)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6205)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
** Activity (main) Create, isFirst = true **
autoversion: 207.0
compilation time: 02/21/2018 20:10:02
** Activity (main) Resume **
** Activity (main) Create, isFirst = true **
autoversion: 209.0
compilation time: 02/21/2018 20:11:18
** Activity (main) Resume **
Copying updated assets files (4)
** Activity (main) Create, isFirst = true **
autoversion: 210.0
compilation time: 02/21/2018 20:12:54
** Activity (main) Resume **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
autoversion: 210.0
compilation time: 02/21/2018 20:12:54
** Activity (main) Resume **
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.cabinet/files/libpdfview2.so" is 32-bit instead of 64-bit
at java.lang.Runtime.load0(Runtime.java:908)
at java.lang.System.load(System.java:1537)
at ice.pdfviewer.pdfviewerwrapper.init(pdfviewerwrapper.java:109)
at com.cabinet.main._addthumnailimage(main.java:833)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at anywheresoftware.b4a.BA$1.run(BA.java:325)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6205)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
** Activity (main) Pause, UserClosed = true **
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
autoversion: 211.0
compilation time: 02/21/2018 20:13:36
** Activity (main) Resume **
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
seems that the lib only support 32 bit native .so (or do not have a 64 bit .so file included)
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Are you using any other library in your project (perhaps with 64bit architecture)?
 
Upvote 0
Top