I've developed an Android app a couple of months ago using Card.IO. It was working normally but now Card.IO don't work and I can't find where's the problem.
Here's my configuration:
build.gradle (from my app module)
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 22
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "appID"
minSdkVersion 14
targetSdkVersion 22
versionCode 6
versionName "1.4.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(project(':volley')) {
exclude module: 'support-v4'
}
compile files('libs/commons-codec-1.9.jar')
compile('com.navercorp.volleyextensions:volley-views:2.0.+') {
exclude module: 'library'
}
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.google.code.gson:gson:2.3.1'
compile 'io.card:android-sdk:5.3.0'
compile 'com.github.ksoichiro:androidpagecontrol:0.1.1'
compile 'me.relex:circleindicator:1.1.5@aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'br.com.jansenfelipe:androidmask:1.0.1'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:design:22.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
}
In my first Activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MultiDex.install(getBaseContext());
Fabric.with(this, new Crashlytics());
FacebookSdk.sdkInitialize(StartActivity.this);
setContentView(R.layout.start_activity);
System.out.println("CARDIOVERIFIER:::::" + CardIOActivity.canReadCardWithCamera());
}
And here is the output of logcat:
01-12 11:23:57.385 30672-30672/? I/card.io: Checking hardware support...
01-12 11:23:57.386 30672-30672/? I/card.io: card.io 5.1.1 10/14/2015 15:59:57 -0500
01-12 11:23:57.386 30672-30672/? E/card.io: Failed to load native library: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/app-package-2/base.apk"],nativeLibraryDirectories=[/data/app/app-package-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libcardioDecider.so"
01-12 11:23:57.386 30672-30672/? W/card.io: - Processor type is not supported
01-12 11:23:57.386 30672-30672/? I/System.out: CARDIOVERIFIER:::::false
I have installed the Card.IO SampleApp on my device and it worked perfectly, so my device has support for Card.IO.
I searched the internet about this and everyone said that I need to put *.so on my libs folder, but when I export the App I can see all the directories that Card.IO use (arm64-v8a, armeabi, armeabi-v7a, etc.) and inside of then have libcardioDecider.so file.
Can anyone help me?
Make sure your Gradle module is up to date.
In your build.grade (not the app gradle) it should look like this :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}