question

parag avatar image
parag asked parquet76 commented

NoClassDefFoundError exception with Room Database

For local storage we used Room Database and it working fine on emulator but same build is crashing on real clover mini device.


Error log

java.lang.NoClassDefFoundError: com.xx.xx.database.room.InventoryDatabase$Companion$MIGRATION_1_2$1
    at com.xx.xx.database.room.InventoryDatabase.<clinit>(InventoryDatabase.kt:50)
    at com.xx.xx.app.App.onCreate(App.kt:24)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4347)
    at android.app.ActivityThread.access$1500(ActivityThread.java:135)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5020)
    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:785)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    at dalvik.system.NativeStart.main(Native Method)

Clover Android SDKClover Mini
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
parquet76 avatar image
parquet76 answered parquet76 commented

This is a NoClassDefFoundError not a NullPointer. I would do a Google search for the error as this is not specific to Clover.

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

parag avatar image parag commented ·
Thanks for help @ , yes review on google but only concern same thing working with emulator?
0 Likes 0 ·
parquet76 avatar image parquet76 parag commented ·
Yeah, that's what you said. It's probably an android build issue of some sort, nothing specific to Clover
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community