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 (32314): load pdf error
E/PDFView (32314): 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 (32314): at com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(Native Method)
E/PDFView (32314): at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:135)
E/PDFView (32314): at com.github.barteksc.pdfviewer.source.FileSource.createDocument(FileSource.java:38)
E/PDFView (32314): at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:53)
E/PDFView (32314): at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:27)
E/PDFView (32314): at android.os.AsyncTask$3.call(AsyncTask.java:378)
E/PDFView (32314): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/PDFView (32314): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/PDFView (32314): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/PDFView (32314): at java.lang.Thread.run(Thread.java:919)
I created in android->app->proguard-rules.pro file with this inside:
-keep class com.example. { *; }
-keep class com.shockwave.* { ; }
-keep class bg.release. { ; }
-keep class com.shockwave.
-keepclassmembers class com.shockwave. { ; }
I also added this code inside android->app->build.grandle:
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
When trying to load PDF I am getting this error:
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 (32314): load pdf error E/PDFView (32314): 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 (32314): at com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(Native Method) E/PDFView (32314): at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:135) E/PDFView (32314): at com.github.barteksc.pdfviewer.source.FileSource.createDocument(FileSource.java:38) E/PDFView (32314): at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:53) E/PDFView (32314): at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:27) E/PDFView (32314): at android.os.AsyncTask$3.call(AsyncTask.java:378) E/PDFView (32314): at java.util.concurrent.FutureTask.run(FutureTask.java:266) E/PDFView (32314): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/PDFView (32314): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/PDFView (32314): at java.lang.Thread.run(Thread.java:919)
I created in android->app->proguard-rules.pro file with this inside: -keep class com.example. { *; } -keep class com.shockwave.* { ; } -keep class bg.release. { ; } -keep class com.shockwave. -keepclassmembers class com.shockwave. { ; }
I also added this code inside android->app->build.grandle: buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.debug signingConfig signingConfigs.release } }