Question

I've been using Card.IO for a while. Recently I switched my build system to Gradle and I noticed the scanner does not work anymore. Instead of the camera popping up, I get a manual entry form instead. I assume this has something to do with the .so files not being included in the build, but I have no idea how to fix this.

I've tried some things in the build.gradle file, such as including '*.so' explicitly and including the subdirectories. But nothing seems to get the scanner back to work.

Was it helpful?

Solution 2

The Gradle Android plugin supports this now, starting version 0.7.2. All you need to do is put the native libraries in src/main/jniLibs

Sources: https://github.com/card-io/card.io-Android-SDK/issues/9 and http://tools.android.com/tech-docs/new-build-system

OTHER TIPS

Gradle doesn't yet fully support NDK and hence the *.so files need to be places in the following structure which is different:

lib/
 .. armeabi/    armeabi-v7a/    mips/       x86/

you can than put it inside of the native-libs.jar, and include that jar with card.io.jar so it ends up in .aar/libs folder.

Hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top