pardom-zz / ActiveAndroid

Active record style SQLite persistence for Android
http://www.activeandroid.com
4.7k stars 1.03k forks source link

NoClassDefFoundError,FingerprintManagerCompatApi23 #431

Open feng88724 opened 8 years ago

feng88724 commented 8 years ago

java.lang.NoClassDefFoundError: android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23

ROM,Android 5.0.1

feng88724 commented 8 years ago
11-25 19:37:06.248: E/AndroidRuntime(17521): FATAL EXCEPTION: main
11-25 19:37:06.248: E/AndroidRuntime(17521): Process: cn.xxx.and, PID: 17521
11-25 19:37:06.248: E/AndroidRuntime(17521): java.lang.NoClassDefFoundError: android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23$1
11-25 19:37:06.248: E/AndroidRuntime(17521):    at java.lang.Class.classForName(Native Method)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at java.lang.Class.forName(Class.java:308)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at com.activeandroid.ReflectionUtils.getModelClasses(ReflectionUtils.java:83)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at com.activeandroid.DatabaseHelper.onCreate(DatabaseHelper.java:46)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at com.activeandroid.Registry.openDatabase(Registry.java:149)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at com.activeandroid.Registry.initialize(Registry.java:107)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:8)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at cn.xxx.and.MyApplication.onCreate(MyApplication.java:22)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4793)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.app.ActivityThread.access$1900(ActivityThread.java:152)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.os.Handler.dispatchMessage(Handler.java:102)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.os.Looper.loop(Looper.java:135)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at android.app.ActivityThread.main(ActivityThread.java:5538)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at java.lang.reflect.Method.invoke(Native Method)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at java.lang.reflect.Method.invoke(Method.java:372)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:958)
11-25 19:37:06.248: E/AndroidRuntime(17521):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:753)
jlhonora commented 8 years ago

Try adding the AA_MODELS tag in your manifest, more info here: https://github.com/pardom/ActiveAndroid/wiki/Creating-your-database-model#speeding-up-application-startup

feng88724 commented 8 years ago

Thandks, AA_MODELS is used to speed up.

I change activeandroid-3.0.jar to activeandroid-3.1-beta.jar, problem fixed.

7xrobin commented 8 years ago

I'm having the same problem and tried the both solutions but didn't work.

My gradle:

android { compileSdkVersion 23 buildToolsVersion '23.0.2'

defaultConfig {
    applicationId "com.example.vntcaro.myapp"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') wearApp project(':wear') compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.google.android.gms:play-services:8.1.0' compile 'com.android.support:design:23.1.1' compile 'com.android.support:cardview-v7:23.1.1' compile 'com.android.support:recyclerview-v7:23.1.1' compile project(':shared') compile files('libs/activeandroid-3.0.jar') compile 'com.android.support:multidex:1.0.0' }

PtiPingouin commented 8 years ago

Any update on this?

dounaka commented 8 years ago

+1

gooner22 commented 8 years ago

adding the AA_MODELS tag worked for me. thank you - @jlhonora !

sainihimanshu commented 8 years ago

Updating to 3.1 beta jar worked for me.

OguzErdi commented 8 years ago

+1

AnthonyKoueik commented 8 years ago
    It's not fixed for me . anyone not using jar ?

    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"

compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:multidex:1.0.0'

compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
7xrobin commented 8 years ago

Update the ActiveAndroid works for me.

AnthonyKoueik commented 8 years ago

Hello what ActiveAndroid version you are using ? compile 'com.michaelpardo:activeandroid:??????????????' thank you

7xrobin commented 8 years ago

compile files('libs/activeandroid-3.0.jar')