Android Question [SOLVED] PDFium library problem

MetalOS

Member
Licensed User
Hello,

I'm having a problem with the PDFium library. I compile the example provided with the library that installs well on my smartphone but when running the test application I have these error and the PDF file is not displayed.

I tried with versions 1.01 and 1.02 of the library but I still have the same problem.

Sorry but I start on B4A. Thank you in advance for your help.


B4X:
Logger connecté à :  HUAWEI ELE-L29
--------- beginning of system
--------- beginning of main
** Activity (main) Pause, UserClosed = false **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
onError()
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap;
    at com.shockwave.pdfium.PdfDocument.<init>(PdfDocument.java:109)
    at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:132)
    at com.github.barteksc.pdfviewer.source.UriSource.createDocument(UriSource.java:38)
    at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:49)
    at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:25)
    at android.os.AsyncTask$2.call(AsyncTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:784)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArrayMap" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/b4a.example-merKlud32IfzWBujIljywA==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-merKlud32IfzWBujIljywA==/lib/arm64, /data/app/b4a.example-merKlud32IfzWBujIljywA==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    ... 11 more
 

MetalOS

Member
Licensed User
I found the solution. I followed Erel's tutorial to go to AndroidX SDK and all works now. Tanks
 
Top