Android Question Error database sometimes

Pooya1

Active Member
Licensed User
Hi
I have error sometimes for database
I have class for use database in it
and initialize it in activity_create
But sometime i have below error that it is bad
android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)
What is it?
 

Mahares

Expert
Licensed User
Longtime User
I have class for use database in it
and initialize it in activity_create
Your best bet is to declare and initialize the database in Starter Service. You need to show your code for members to attempt to help you.
 
Upvote 0

Pooya1

Active Member
Licensed User
Your best bet is to declare and initialize the database in Starter Service. You need to show your code for members to attempt to help you.
My code sql example exist in forum
Starter run before start activity?
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
I have class for use database in it

Is this DBUtils class ?

My code sql example exist in forum

How do we know if you have made any changes .. ? Which example ?

Starter run before start activity?

Yes

As @Mahares suggested ... Your best bet is to declare and initialize the database in Starter Service.

Try it and see if you still get the error.

If yes then re post your problem AND Include some code !
 
Upvote 0

Pooya1

Active Member
Licensed User
Thank you
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…