flutter_full_pdf_viewer icon indicating copy to clipboard operation
flutter_full_pdf_viewer copied to clipboard

No implementation found

Open DanielCardona opened this issue 4 years ago • 11 comments

I was working before, I don't know why it dosen't now?

I get this error on console, the problem is only Anroid related:

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)

Thank so much!

DanielCardona avatar May 16 '20 07:05 DanielCardona

I also encounter the same issue. Perhaps, the title should be Native libraries failed to load: couldn't find "libmodpng.so".

The library was working fine on dev channel 1.16.4-pre83.

Now it fails on later dev versions as 1.16.4-pre83 is no longer there, and also fails on 1.17.1 channel stable:

Flutter 1.17.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f7a6a7906b (6 days ago) • 2020-05-12 18:39:00 -0700
Engine • revision 6bc433c6b6
Tools • Dart 2.8.2
E/com.shockwave.pdfium.PdfiumCore( 8159): Native libraries failed to load - java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/[appPackageNameCode]/base.apk"],nativeLibraryDirectories=[/data/app/[appPackageNameCode]/lib/arm64, /data/app/[appPackageNameCode]/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libmodpng.so"
W/ps.app_name( 8159): Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (light greylist, reflection)
E/ps.app_name( 8159): 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)
E/PDFView ( 8159): load pdf error
E/PDFView ( 8159): 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)
E/PDFView ( 8159): 	at com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(Native Method)
E/PDFView ( 8159): 	at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:113)
E/PDFView ( 8159): 	at com.github.barteksc.pdfviewer.source.FileSource.createDocument(FileSource.java:38)
E/PDFView ( 8159): 	at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:53)
E/PDFView ( 8159): 	at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:25)
E/PDFView ( 8159): 	at android.os.AsyncTask$2.call(AsyncTask.java:333)
E/PDFView ( 8159): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/PDFView ( 8159): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/PDFView ( 8159): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/PDFView ( 8159): 	at java.lang.Thread.run(Thread.java:764)
W/System  ( 8159): A resource failed to call close. 

nhantran0 avatar May 19 '20 00:05 nhantran0

Same in my app.

madlick71 avatar May 19 '20 05:05 madlick71

I had the same problem. To fix this remove minifyEnabled true from the release config inside the buildTypes of android/app/gradle.build.

thomas4Bitcraft avatar Jun 10 '20 13:06 thomas4Bitcraft

That's great news @thomas4Bitcraft!! as soon as I can I will try, Thank so much for share.

DanielCardona avatar Jun 10 '20 15:06 DanielCardona

Sadly still with the same problem. Removing minifyEnabled true, didn't make it work.

DanielCardona avatar Jun 28 '20 08:06 DanielCardona

For me solved as following:

  • Removed the app from the device.
  • flutter clean
  • Re-installed the app.

Fhyrel avatar Aug 27 '20 10:08 Fhyrel

I have this problem Too.

Flutter: 1.17.5

Runing in debug mode or release mode.

Both doesnt show the pdf file.

E/com.shockwave.pdfium.PdfiumCore(28515): Native libraries failed to load - java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/****-TaiWevzo7au7sddeIqZynw==/base.apk"],nativeLibraryDirectories=[/data/app/****-TaiWevzo7au7sddeIqZynw==/lib/arm64, /data/app/****-TaiWevzo7au7sddeIqZynw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "**libmodpng**.so"

renenucci avatar Nov 15 '20 19:11 renenucci

I was working before, I don't know why it dosen't now?

I get this error on console, the problem is only Anroid related:

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)

Thank so much!

Any news about this? ...

renenucci avatar Nov 15 '20 19:11 renenucci

Do you resolved this error? I have the same problem ;(

Gabrielxp avatar Apr 08 '21 20:04 Gabrielxp

  • flutter clean

THANKS @Fhyrel I RESOLVED WHITH FLUTTER CLEAN TOO!

Gabrielxp avatar Apr 08 '21 20:04 Gabrielxp

Run: flutter pub add pdfx

The issue will be resolved as it adds all of the missing library and build correctly.

reference: https://github.com/syncfusion/flutter-widgets/issues/677#issuecomment-1099531436

ChitreshPratap avatar Apr 17 '22 13:04 ChitreshPratap