ActiveAndroid icon indicating copy to clipboard operation
ActiveAndroid copied to clipboard

NoClassDefFoundError,FingerprintManagerCompatApi23

Open feng88724 opened this issue 8 years ago • 13 comments

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

ROM,Android 5.0.1

feng88724 avatar Nov 25 '15 11:11 feng88724

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)

feng88724 avatar Nov 25 '15 11:11 feng88724

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

jlhonora avatar Nov 25 '15 13:11 jlhonora

Thandks, AA_MODELS is used to speed up.

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

feng88724 avatar Nov 25 '15 15:11 feng88724

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' }

7xrobin avatar Jan 06 '16 16:01 7xrobin

Any update on this?

PtiPingouin avatar Jan 07 '16 11:01 PtiPingouin

+1

dounaka avatar Jan 26 '16 00:01 dounaka

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

gooner22 avatar Jan 27 '16 10:01 gooner22

Updating to 3.1 beta jar worked for me.

sainihimanshu avatar Apr 20 '16 10:04 sainihimanshu

+1

OguzErdi avatar Aug 02 '16 12:08 OguzErdi

    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'

AnthonyKoueik avatar Oct 27 '16 09:10 AnthonyKoueik

Update the ActiveAndroid works for me.

7xrobin avatar Oct 27 '16 17:10 7xrobin

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

AnthonyKoueik avatar Oct 28 '16 07:10 AnthonyKoueik

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

7xrobin avatar Oct 28 '16 14:10 7xrobin