-
Notifications
You must be signed in to change notification settings - Fork 305
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
Caused by: java.lang.IllegalStateException: No DB catalog present #1169
Comments
机型:xiaomi 手机 |
Thanks for reporting! To help us diagnose this issue, please answer some questions. How often does this occur? Does this only occur on that device model? What version of ObjectBox is used? What version of Android is used? See the comment in #865 for potential solutions. As the file is on an SD card this might be a case of file corruption. |
crash:100% |
@whatshappen Thanks! Does the app use multiple processes by any chance? |
no,init crash, is main thread |
Code:
val file = File(SDCardUtils.getSDCardPathByEnvironment() + "/CustomFile/dbFile")
if (!file.exists()) {
file.exists()
}
MyObjectBox.builder()
.androidContext(context.applicationContext)
.directory(file)
.build()
Error:
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3909)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4062)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2415)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8401)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Caused by: java.lang.IllegalStateException: No DB catalog present
at io.objectbox.BoxStore.nativeCreateWithFlatOptions(Native Method)
at io.objectbox.BoxStore.(BoxStore.java:271)
at io.objectbox.BoxStoreBuilder.build(BoxStoreBuilder.java:591)
The text was updated successfully, but these errors were encountered: