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

zed

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

Attachments

  • ScreenShot.png
    13.2 KB · Views: 111
  • ScreenShot2.png
    8.8 KB · Views: 99
  • Vzorec_sifranta_V2.zip
    74.6 KB · Views: 119
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…