Skip to content

Crash in MyObjectBox.builder() on Kitkat #341

@silviahisham

Description

@silviahisham

Issue Basics

  • ObjectBox version : 1.3.4
  • Reproducibility: always

Reproducing the bug

Description

NoClassDefFoundError: io.objectbox.ModelBuilder Crash when I first open the app on Kitkat in MyObjectbox.builder()

Code

public class MyApplication extends Application {

    private BoxStore mBoxStore;

    @Override
    public void onCreate() {
        super.onCreate();

        //Where it crashes
        mBoxStore = MyObjectBox.builder().androidContext(elmenusApplication.this).build();
    }
}

Logs & stackstraces

java.lang.NoClassDefFoundError: io.objectbox.ModelBuilder
                                                     at com.elmenus.app.models.MyObjectBox.getModel(MyObjectBox.java:72)
                                                     at com.elmenus.app.models.MyObjectBox.builder(MyObjectBox.java:54)
                                                     at com.elmenus.app.MyApplication.onCreate(MyApplication.java:40)
                                                     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
                                                     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
                                                     at android.app.ActivityThread.access$1500(ActivityThread.java:135)
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                     at android.os.Looper.loop(Looper.java:136)
                                                     at android.app.ActivityThread.main(ActivityThread.java:5017)
                                                     at java.lang.reflect.Method.invokeNative(Native Method)
                                                     at java.lang.reflect.Method.invoke(Method.java:515)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                                                     at dalvik.system.NativeStart.main(Native Method)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions