litesuits / litesuits/android-lite-orm

W/System.err: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)

Open
#74 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.5k
Forks
359
PR merge metrics
No merged PRs in 30d

Description

全局使用一个sqlite
`public static LiteOrm getOrmInstance(){
if (liteOrm == null) {
synchronized (OrmUtil.class){
if(liteOrm==null){
liteOrm = LiteOrm.newSingleInstance(MyApplication.getAppContext(), "liteorm.db");
}
}
}
liteOrm.setDebugged(true); // open the log
return liteOrm;
}`
出现这种问题java.lang.IllegalStateException: attempt to re-open an already-closed object:
怎么解决啊 作者,有时间看下

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the getOrmInstance() snippet and the LiteOrm.newSingleInstance call shown in the report. Reproduce or trace the reported SQLiteCantOpenDatabaseException and re-opened-object error; done means the cause is identified and the database can be opened and used without the reported crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, sqlite
Domain
databases, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.