ActiveAndroid icon indicating copy to clipboard operation
ActiveAndroid copied to clipboard

Android 5.0 java.lang.IncompatibleClassChangeError

Open gordonpro opened this issue 10 years ago • 6 comments

java.lang.IncompatibleClassChangeError: org.apache.http.params.SyncBasicHttpParams
            at dalvik.system.DexFile.defineClassNative(Native Method)
            at dalvik.system.DexFile.defineClass(DexFile.java:226)
            at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
            at dalvik.system.DexPathList.findClass(DexPathList.java:321)
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
            at java.lang.Class.classForName(Native Method)
            at java.lang.Class.forName(Class.java:308)
            at com.activeandroid.ModelInfo.scanForModelClasses(ModelInfo.java:187)
            at com.activeandroid.ModelInfo.scanForModel(ModelInfo.java:152)
            at com.activeandroid.ModelInfo.<init>(ModelInfo.java:63)
            at com.activeandroid.Cache.initialize(Cache.java:66)
            at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:44)
            at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:34)
            at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:30)
            at com.xxxxker.App.onCreate(App.java:67)

I tested the android version lower 5.0, them all work fine.

gordonpro avatar Feb 13 '15 07:02 gordonpro

I'm having the same issue. Looking at the source of the ModelInfo class, maybe just another catch block is all that we would need, as SyncBasicHttpParams is clearly not a Model class.

zsoltk avatar Feb 26 '15 00:02 zsoltk

It indeed fixes it. I created a pull request: https://github.com/pardom/ActiveAndroid/pull/344

As a sidenote: the automatic Travis build yet again fails with The command "echo no | android create avd --force -n test -t $ANDROID_SDK --abi $ANDROID_ABI" failed and exited with 1 during ., just like almost all the time. It doesn't even start the tests, and I see lots of pull request with the same fate. Anyone knows what's the problem?

EDIT: I guess https://github.com/pardom/ActiveAndroid/pull/310 would fix the Travis issue, but repo owner seems pretty much inactive...

zsoltk avatar Mar 02 '15 23:03 zsoltk

you can define all you model classes in Manifest

so AA wont scan Apache folders and classes. Works for me.

chechoora avatar Nov 06 '15 10:11 chechoora

I'm having the same issue.Anyone can help me?

lilincpp avatar Jul 20 '16 09:07 lilincpp

any Update?

sachinletsgo avatar Jul 13 '17 12:07 sachinletsgo

lot of issue, don't use this

Gituheart avatar Jun 28 '18 14:06 Gituheart