NeutrinosPlatform / cordova-plugin-document-scanner

cordova plugin for document scan
https://www.neutrinos.co/
MIT License
84 stars 63 forks source link

Plugin crashes after update #24

Closed waqasmq closed 6 years ago

waqasmq commented 6 years ago

Hi chris, I built my ionic app today after some other changes ( not related to this plugin).. and i saw it updated the cordova scan plugin.. and since then this plugin starts to crash. it does not open camera or gallery options :( ..
and in the phone log i can see this exception

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/io.ionic.starter-eC91gWckgNN3MK_UB9WYeA==/base.apk"],nativeLibraryDirectories=[/data/app/io.ionic.starter-eC91gWckgNN3MK_UB9WYeA==/lib/arm64, /system/lib64, /system/vendor/lib64]]] couldn't find "libopencv_java3.so"

I was able to solve this by following the solution in this thread https://stackoverflow.com/questions/33030900/android-unsatisfiedlinkerror-with-tesseract-and-opencv

any ideas about a proper fix?

ChrisTomAlx commented 6 years ago

Hey @waqasmq

I think I have found a solution to this. I have made changes to the scan library, Could you please test it if possible? Let me know if this worked.

The opencv library was being loaded first, which has 64 bit builds in it. I have changed the code to load the scanner library first which has only 32 bit builds. So now it will make sure 32 bit builds are used when running the app. If this solves it for you then it should probably be a permanent solution to issue #8 as well.

Cheers, Chris Neutrinos

waqasmq commented 6 years ago

Hey @ChrisTomAlx , I have tested now without the workaround and its works fine. Thanks for the help mate 👍

Regards, Waqas

ChrisTomAlx commented 6 years ago

@waqasmq

That is great news. Will let the people on the other issue know this has been fixed as well.

Cheers and thanks a ton for your help :) Chris Neutrinos

openopen114 commented 6 years ago

i got the same crash issue on the Android before... but i "git clone" my ionic project and then "npm i", "ionic cordova platform add android"

right now it works perfectly on the phone !! sooo thank you for fix this issue

ChrisTomAlx commented 6 years ago

@openopen114

I am glad that it worked for you ;)

Cheers, Chris Neutrinos