Activeandroid在Lollipop上崩溃 - NoClassDefFoundError

时间:2014-11-14 15:28:57

标签: java android exception android-activity activeandroid

当我尝试在Lollipop上初始化活动的android时,它会崩溃。任何想法如何解决它?在版本< 5它工作正常

11-14 17:07:05.160    2907-2907/com.sampleapp.random E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.sampleapp.random, PID: 2907
    java.lang.NoClassDefFoundError: lombok.javac.LombokOptions
            at java.lang.Class.classForName(Native Method)
            at java.lang.Class.forName(Class.java:308)
            at com.activeandroid.ModelInfo.scanForModelClasses(Unknown Source)
            at com.activeandroid.ModelInfo.scanForModel(Unknown Source)
            at com.activeandroid.ModelInfo.<init>(Unknown Source)
            at com.activeandroid.Cache.initialize(Unknown Source)
            at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
            at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
            at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
            at com.sampleapp.random.randomApplication.onCreate(randomApplication.java:33)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
            at android.app.ActivityThread.access$1500(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

1 个答案:

答案 0 :(得分:1)

尝试注册您的模型类:

How to disable scanning for model in Activeandroid

这应该可以帮助你:)