-
Notifications
You must be signed in to change notification settings - Fork 308
io.objectbox.exception.DbException: Schema entity could not be verified for key 2 #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think its my problem to invoke builder. but I want ask a question: |
Do I understand correctly that it fails only if you try to access a mdb file that you previously copied there? Where does this file originate from? |
1、seems no problem if I access a mdb that I reviously copied in directory. |
At the moment we have no guarantee that data files can be copied from one device to another. While there are efforts to make the data file architecture independent, it's nothing we test for yet. Let me investigate a bit and I'll come back to you later. So, right now, the safest path would be not to bundle a data.mdb file with your app. |
Got it, Please let me know whether it is feasible , Thanks . |
Closing this, it's now tracked via #310 |
Version:1.2.1
Exception:
FATAL EXCEPTION: main Process: philm.vilo.im, PID: 18973 java.lang.RuntimeException: Unable to create application com.android.APP: io.objectbox.exception.DbException: Schema entity could not be verified for key 2 at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4812) at android.app.ActivityThread.access$1700(ActivityThread.java:156) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5637) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:746) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636) Caused by: io.objectbox.exception.DbException: Schema entity could not be verified for key 2 at io.objectbox.BoxStore.nativeCreate(Native Method) at io.objectbox.BoxStore.<init>(BoxStore.java:190) at io.objectbox.BoxStoreBuilder.build(BoxStoreBuilder.java:270) at com.objectbox.manager.ObjectBoxManager.init(ObjectBoxManager.java:51) at com.android.App.onCreate(App.java:154) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4809) at android.app.ActivityThread.access$1700(ActivityThread.java:156) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5637) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:746) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
Exception Line:
BoxStoreBuilder builder = MyObjectBox.builder().baseDirectory(new File(TietieFileSystem2.sLocalRoot)); boxStore = builder.build(); if (BuildConfig.DEBUG) { new AndroidObjectBrowser(boxStore).start(context); }
I try to specify the location of where the DB files should be stored, when open app next time , this Exception will be happen. And I can find the mdb file in the dir, This cannot use in this way?
The text was updated successfully, but these errors were encountered: