DImuthuUpe / AndroidPdfViewer

Android view for displaying PDFs rendered with PdfiumAndroid
Apache License 2.0
8.17k stars 1.91k forks source link

Android compatibility #1216

Open akramraza2 opened 3 weeks ago

akramraza2 commented 3 weeks ago

While loading a pdf file in android device, getting following error and the pdf doesn' load.

No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2) - is the library loaded, e.g. System.loadLibrary? alamaan.ois load pdf error (Ask Gemini) java.lang.UnsatisfiedLinkError: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2) - is the library loaded, e.g. System.loadLibrary? at com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(Native Method) at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:135) at com.github.barteksc.pdfviewer.source.FileSource.createDocument(FileSource.java:38) at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:53) at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:27) at android.os.AsyncTask$3.call(AsyncTask.java:394) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)

akramraza2 commented 3 weeks ago

Here's an important update. The issue happens with android 15 devices which have 16KB kernel pages. Here's the behavior change for it. https://developer.android.com/about/versions/15/behavior-changes-all#16-kb