2

I know there are two similar questions asked about this issue, but both questions did not receive any explicit solutions. I have also tried the solutions mentioned but none solved mine.

My issue is that I have a database created (using DB Browser for SQLite). When I pasted the db in the assets > databases folder, the error appeared. See attached picture for reference.

DB ERROR:

DB ERROR

Solutions I've tried:

  1. click the 'reload in another coding' option and still select on UTF-8 as stated on one of the solutions mentioned here (File was loaded in the wrong encoding:'UTF-8' in IntelliJ IDEA).

  2. Set UTF-8 for all encoding - IDE, Project & Default, as stated here (Android Studio Project Encoding Error).

None of the above-mentioned solutions worked for mine.

As such, I'd like to know if there are other alternative solutions I can use to solve this problem? Or should I just reload to another type of encoding? (but most of the options showed the red/grey exclamation mark too.)

bad_coder
  • 11,289
  • 20
  • 44
  • 72
  • Are you trying to open the database in a text editor? – Shawn Oct 24 '18 at 04:59
  • No, I just want to import to the database into my app. The video guide I have followed does not show this error when he pasted the database into the assets folder, but mine appeared. So I'm wondering if it will still be fine when I run my app even with the encoding error. –  Oct 24 '18 at 05:16
  • What do you mean by "pasted the database"? You didn't just copy or move the file from one location to another? And your screenshot shows it open in what sure looks like some kind of editor, which is... really strange. It's a binary file format, not something human readable that you would do such a thing with. – Shawn Oct 24 '18 at 05:40
  • I saved the database (named "Knowledge.db", created at DB Browser for SQLite) and saved it in my Desktop > Database folder. Afterwards, I copy the Knowledge.db file and paste them in Android Studio's assets > databases folder. However, when I paste it at Android Studio, the Knowledge.db file automatically open just like the screenshot and that's when the error come about. –  Oct 24 '18 at 05:51

1 Answers1

4

I solved this problem by doing NOTHING.

If anyone else experience this problem, you may just continue on with your development and ignore the not-so error. It will not affect your development in the future.

Pang
  • 9,564
  • 146
  • 81
  • 122