halkar / Tesseract.Xamarin

Tesseract OCR wrapper for Xamarin
MIT License
121 stars 40 forks source link

Couldn't find "libpngt.so" on real Device #25

Closed Nyankoo closed 8 years ago

Nyankoo commented 8 years ago

I'm trying to check a bitmap with the following code:

TesseractApi tessApi = new TesseractApi(context, AssetsDeployment.OncePerVersion); await tessApi.Init("jpn"); await tessApi.SetImage(bitmapData);

and everything is working fine on an emulator, but after I tried to test it on a Samsung Galaxy S6 I got the following error:

dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/project.svgtest.svg_test-
1/base.apk"],nativeLibraryDirectories=[/data/app/project.svgtest.svg_test-1/lib/arm64, /vendor/lib64, 
/system/lib64]]] couldn't find "libpngt.so"

Google just finds a few similar cases where they recommended to rebuild Tesseract so when I understand it right it seems to be still an issue even when the same report was closed already.

Using Xamarin 4 with Xamarin Studio on a Mac.

halkar commented 8 years ago

@Nyakoo which version of library do you use and which Android version S6 is running?

Nyankoo commented 8 years ago

@halkar 0.3.0 from nuget and my S6 runs on 5.1.1

halkar commented 8 years ago

@Nyankoo silly idea but could you update your Xamarin environment to the latest version (5.10.1 on my machine)?

Nyankoo commented 8 years ago

@halkar Xamarin Studio is already at version 5.10.1. Are you able to reproduce the exception?

halkar commented 8 years ago

@Nyankoo no :(

joelbrito commented 8 years ago

Same happens with Huawei P8 Lite, with arm64 cpu. There is no native lib for this cpu architecture, so that should be the cause of the error.

Nyankoo commented 8 years ago

@halkar The S6 has arm64 cpu too, so maybe you need to look into this.

halkar commented 8 years ago

@joelbrito @Nyankoo thanks, will check today.

halkar commented 8 years ago

@Nyankoo @joelbrito could you please try this version? Xamarin.Tesseract.0.3.1.nupkg.zip

Nyankoo commented 8 years ago

@halkar I tried it with my S6 and everything is working now. Thank you for the good and fast solution! Hope it works for @joelbrito too. Can I asked how you solved it?

joelbrito commented 8 years ago

@halkar It works on P8 Lite too. Thanks.

halkar commented 8 years ago

@Nyankoo answer is - I'm an idiot. I was trying to reduce size of the library and excluded native libs for some platforms. Sorry guys! I will update the nuget package tonight.