Android Question I could not open s3db file: RESOLVED

akinnovation

Member
Licensed User
Longtime User
Hi all,

my application doesn't succeded in open a .s3db file, the error is :
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (Sqlite code 14): Could not open database, (OS error - 13:permission denied)

But I can open and edit it with "asqlmanager" app.

Another question, sometimes when I open the .apk file (with winrar) I don't see the assetsfile directory and the installation doesn't copy anybody on the phone, why ?

Many thanks for the help.
Marco

p.s. I compile with 10.2 version
 

klaus

Expert
Licensed User
Longtime User
Where is your database located?
From the error message it seems that you have no permission.
You cannot work with a database in File.DirAssets, you need to copy it somewhere else on the device.

Did you try to rename the database file to xxx.db instead of xxx.s3db?
 
Upvote 0

akinnovation

Member
Licensed User
Longtime User
Where is your database located?
From the error message it seems that you have no permission.
You cannot work with a database in File.DirAssets, you need to copy it somewhere else on the device.

Did you try to rename the database file to xxx.db instead of xxx.s3db?
 
Upvote 0

akinnovation

Member
Licensed User
Longtime User
Hi all,
I have resolved, in the past I have set in the manifest the "android:targetSdkVersion="29"", then I have re-modified the target to 19 and all is OK
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I have resolved, in the past I have set in the manifest the "android:targetSdkVersion="29"", then I have re-modified the target to 19 and all is OK
you´ll not be able to upload the app to the playstore!
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Do you know why I can't use the sqlite with sdk=29 and I can use it with sdk=19
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Again: Where is your database located?
You answered: The Db is in internal memory in own directory.
Which internal memory?
Where did you save or copy it !?
Again: I suspect that you are missing permission to access your database file.
 
Upvote 0
Top