You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.
Android Version and Device: Happens with all devices
Issue description
When using DexGuard for obfuscating our application which uses the card.io library, all card.io native libraries (.so files) get removed from the final apk. DexGuard is a commercial extension of ProGuard. It removes all native libraries that it thinks are not used, unlike ProGuard which doesn't touch the native libraries.
The reason why DexGuard removes them for card.io is that in the CardScanner.java the native libraries are loaded differently than what DexGuard requires. They say in their documentation "... you should make sure that your code loads each native library with System.loadLibrary("mycode"), with the name specified as a string literal or constant.". But in CardScanner.java the libraries are loaded with a String variable inside the method "loadLibrary(String libraryName)". That's why DexGuard doesn't find the link between the native libraries and the Java code.
I wrote a fix for this locally and the native libraries are working with it in our application, but I haven't tried with ProGuard. I can send a patch file if needed.
The text was updated successfully, but these errors were encountered:
jukka828
added a commit
to jukka828/card.io-Android-source
that referenced
this issue
Jul 28, 2017
This will fix the issue: card-io#134
The behaviour of the library does not change. Only the way it's written changes.
I tested with the SampleApp and our company's production app which uses DexGuard. I tested with these devices:
- Samsung Galaxy S6, Android 7.0
- Sony Xperia Z5 Compact, Android 7.1.1
- HTC One M8, Android 6.0
- Nexus 5, Android 5.1.1
- Samsung Galaxy S4, Android 4.4.2
General information
Issue description
When using DexGuard for obfuscating our application which uses the card.io library, all card.io native libraries (.so files) get removed from the final apk. DexGuard is a commercial extension of ProGuard. It removes all native libraries that it thinks are not used, unlike ProGuard which doesn't touch the native libraries.
The reason why DexGuard removes them for card.io is that in the CardScanner.java the native libraries are loaded differently than what DexGuard requires. They say in their documentation "... you should make sure that your code loads each native library with System.loadLibrary("mycode"), with the name specified as a string literal or constant.". But in CardScanner.java the libraries are loaded with a String variable inside the method "loadLibrary(String libraryName)". That's why DexGuard doesn't find the link between the native libraries and the Java code.
I wrote a fix for this locally and the native libraries are working with it in our application, but I haven't tried with ProGuard. I can send a patch file if needed.
The text was updated successfully, but these errors were encountered: