Android : findLibrary works on phone but not on Tablet

on Wednesday, January 28, 2015


I'm using the Kofax library in my android project.


The structure of the libs folder is:



jniLibs
-armeabi
--(.so libraries)
-armeabi-v7
--(.so libraries)
(.jar libraries)


my grade build file includes



task nativeLibsToJar(type: Zip, description: 'create a jar archive of the native libs') {
destinationDir file("libs")
baseName 'libs-arm'
extension 'jar'
from fileTree(dir: 'libs', include: '**/*.so')
into 'lib/'
}

tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn(nativeLibsToJar)
}

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':googleplayservices_lib')
}

sourceSets { main { jniLibs.srcDirs = ['libs'] } }


This configuration works fine running on a Samsung Galaxy SIII phone but when I run the application on Samsung Galaxy Tab 10.1, it crashes with the following error:



Caused by: java.lang.UnsatisfiedLinkError: Couldn't load AtalaBar from loader dalvik.system.PathClassLoader[dexPath=/data/app/enbd.mobilebanking-2.apk,libraryPath=/data/app-lib/enbd.mobilebanking-2]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at com.kofax.kmc.kut.utilities.IpLibUtil.<clinit>(SourceFile:70)
at com.kofax.kmc.kut.utilities.Licensing.setMobileSDKLicense(SourceFile:41)
at enbd.mobilebanking.configuration.FTApplication.setKofaxLicense(FTApplication.java:38)


At first I thought it was a processor problem: the libraries I have are for the ARM processor and the tablet uses the Krait processor. However, when I run Koufax's sample application, it works fine. I've compared the gradle file of the sample app and mine and everything is in order.


I can't figure out where the problem is. I'd really appreciate some help. Thanks.


0 comments:

Post a Comment