pdf_viewer_plugin icon indicating copy to clipboard operation
pdf_viewer_plugin copied to clipboard

App crash on finale release

Open ShrJamal opened this issue 5 years ago • 25 comments

The PDF Viewer works well on debug and release mode, but after building the apk and install it, the app crash when trying to open a pdf. Any idea why?

ShrJamal avatar Oct 24 '19 22:10 ShrJamal

I can confirm. Whats the state about this issue?

pboethig avatar Nov 03 '19 14:11 pboethig

The problem is with the android_pdf library used "'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1''. I downgrade the dependency version and works fine. check the native dependency here: https://github.com/barteksc/AndroidPdfViewer

ShrJamal avatar Nov 03 '19 18:11 ShrJamal

@SHRJamal Thanks for investigating, the downgrade resolve this issue?

lubritto avatar Nov 08 '19 18:11 lubritto

@lubritto Yep, It did for me

ShrJamal avatar Nov 08 '19 19:11 ShrJamal

Ok, I will test here and update the plugin to use this version. Thanks!

lubritto avatar Nov 08 '19 19:11 lubritto

@lubritto Yep, It did for me

Hi SHRJamal, Which version 'com.github.barteksc:android-pdf-viewer are you used?

duongnm-1057 avatar Nov 12 '19 07:11 duongnm-1057

@duongnm-1057 I used the stable version 2.8.2, the version 3 still in beta 'com.github.barteksc:android-pdf-viewer:2.8.2'

ShrJamal avatar Nov 12 '19 10:11 ShrJamal

@duongnm-1057 I used the stable version 2.8.2, the version 3 still in beta 'com.github.barteksc:android-pdf-viewer:2.8.2'

Many thanks

duongnm-1057 avatar Nov 13 '19 01:11 duongnm-1057

@SHRJamal how to i specify the com.github.barteksc:android-pdf-viewer:2.8.2 dependancy?

MaxChal avatar Nov 16 '19 05:11 MaxChal

@MaxChal you need to fork this plugin and change the version in the Gradle file. else I think the plugin author @lubritto is in the process to fix the issue.

ShrJamal avatar Nov 17 '19 09:11 ShrJamal

@lubritto please think about fix the issue, many thanks.

w4mxl avatar Dec 11 '19 16:12 w4mxl

@lubritto, thanks for developing this plugin. It is crashing mine too. It works well on a J3 device Android 5.5, but crash in all newer devices. Tried the downgrade solution from SHRJamal, but it did not fix. Apk crashes on splash screen.

egidiocs avatar Dec 11 '19 18:12 egidiocs

the crash log: [Native crash above happened with a Java pending exception as following]

10 java.lang.ClassNotFoundException: Didn't find class "com.shockwave.pdfium.util.Size" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/*********-uBoGl_wKRm0CjsejWIaa1g==/base.apk"]

lujiayi1228 avatar Dec 26 '19 05:12 lujiayi1228

Is there a permanent fix for this?

amit-onappr avatar Jan 03 '20 12:01 amit-onappr

Downgrading com.github.barteksc:android-pdf-viewer resolved the issue

amit-onappr avatar Jan 03 '20 15:01 amit-onappr

Thanks for the plugin, but this issue is causing me to use another solution until this is fixed.

thebrianbug avatar Jan 29 '20 17:01 thebrianbug

Same issue here... =( @lubritto, my brazilian friend, could you please fix it? I thinks that if you downgrade the 'com.github.barteksc:android-pdf-viewer' dependency will work

raphaelsilvasage avatar Feb 04 '20 13:02 raphaelsilvasage

@lubritto obrigado pelo excelente package. É o meu preferido dentro os disponíveis até o momento. Sobre este problema, poderia orientar a gente como fazer a correção alternativa até que vc possa ajustar o erro?

leonardopaim avatar Feb 25 '20 12:02 leonardopaim

Importing the Android Project in Android Studio and build the APK with Android Studio (Build/Generate Signed Bundle/APK..) works for me. You also have to add this to your build.gradle: defaultConfig { ndk { abiFilters 'armeabi-v7a' } ... }

Bendix20 avatar Feb 28 '20 10:02 Bendix20

As mentioned before, the solution is to downgrade the package. But I had to force it, otherwise it doesn't work. So you have to add this to the app level build.gradle file. downgrade

dependencies { implementation('com.github.barteksc:android-pdf-viewer:2.8.2'){ force = true } }

Robeszpierre avatar Mar 03 '20 14:03 Robeszpierre

App size Increased by 20 mb? Anybody having Size issue after using this plugin?

techieasif avatar Mar 11 '20 07:03 techieasif

Hello guys, sorry about the late. I'm working on soo many projects at this moment. I will try your suggestions, fills free to open PRs and contribute with the package.

lubritto avatar Mar 31 '20 13:03 lubritto

Looks like there is an open PR for this - https://github.com/lubritto/Pdf_Viewer_Plugin/pull/27

@lubritto you think the fix looks good and can be merged in?

M1Joe avatar Apr 23 '20 02:04 M1Joe

It seems that someone at stackoverflow has solved this issue: https://stackoverflow.com/questions/61519557/i-am-using-pdf-viewer-plugin-and-in-android-studio-i-have-no-problem-but-when-i

jglatre avatar Jan 28 '21 06:01 jglatre

This will help https://www.youtube.com/watch?v=gAUVz0U7eyA

myselfuser1 avatar Mar 17 '23 12:03 myselfuser1