question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash in MyObjectBox.builder() on Kitkat

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
silviahishamcommented, Jan 23, 2018

Sorry, the crash turned out to be because of an issue related to MultiDex not ObjectBox

0reactions
greenrobot-teamcommented, Jan 23, 2018

Thanks for the update, closing then. For anybody with this issue, please carefully read the Multidex documentation. -ut

Read more comments on GitHub >

github_iconTop Results From Across the Web

App crashes on Android kitkat OS - Stack Overflow
Yes, the issue is related to the os. From version to version features can change and old tools can no longer be supported....
Read more >
Android Library - IM Geek开发者社区
private void getImage() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { startActivityForResult(new Intent(Intent.
Read more >
Android Codes
Why is the build() method on State and not StatefulWidget? ... (Application Crash Reports for Android) to send crash logs when crash occurs....
Read more >
App Crashes When I Try To Launch In Android Kitkat 4.4.4 But ...
**If your minSdkVersion is set to 21 or higher, all you need to do is set multiDexEnabled to true in your module-level build.gradle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found