Android Question Error DBUtils java.io.FileNotFoundException ....

Fizzy

Member
Can someone please help me because I don't know what to do ...

1689660981647.png
 

zed

Active Member
Licensed User
The database must be in the file folder (assets)
 

Attachments

  • ScreenShot.png
    ScreenShot.png
    13.2 KB · Views: 118
  • ScreenShot2.png
    ScreenShot2.png
    8.8 KB · Views: 106
  • Vzorec_sifranta_V2.zip
    74.6 KB · Views: 126
Upvote 0

aeric

Expert
Licensed User
Longtime User
You cannot open a database in the assets folder. This is a virtual read-only folder located inside the APK file. You will need to first copy the database to a writable location.

Use CopyDBFromAssets from DBUtils to copy the db to File.DirInternal.

 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I'm a complete beginner
Since you are new you deserve a break, but you are starting off on the wrong foot. Here are the reasons:
1. Do not use an image to display error messages. Use text.
2. Do not use red text on black background. Hard to read.
3. Use xCustomListView instead of Listview.
4. Use Resultset instead of cursor.
5. Do not answer by saying simply 'Thank you'. It is better if you explain how you solved it. It is more helpful to others than a hollow 'Thank you'
 
Upvote 0
Top