Crash in MyObjectBox.builder() on Kitkat
See original GitHub issueIssue 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, the crash turned out to be because of an issue related to
MultiDex
notObjectBox
Thanks for the update, closing then. For anybody with this issue, please carefully read the Multidex documentation. -ut