1

I am new to android programming.
* I downloaded and installed phonegap, made the hello world application which worked.
* I downloaded sencha-touch2 and created an application under the www folder of the hello world application.
* I merged between the phonegap index.html and the index.html I got from sencha-touch2.
* I ran the android application and tried the following in the main java code:
- I set the flag of database enabled using the appView.
- I tried to set the path of the database.

However, in any case, I arrive to the following message:

04-30 08:19:25.638: I/SqliteDatabaseCpp(14447): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/com.phonegap.hello/databases/webview.db

Please help !

Saurabh Gokhale
  • 53,625
  • 36
  • 139
  • 164
user502490
  • 146
  • 1
  • 10
  • 1
    There are many links that already discuss the same error .. you should have google'd a bit .. 1) http://stackoverflow.com/questions/6202926/android-sqliteopenhelper-cannot-open-database-file .... 2) http://stackoverflow.com/questions/9974738/phonegap-sqlite-returned-error-code-14-msg-cannot-open-file-at-line-27206 .... 3) http://stackoverflow.com/questions/8998017/cannot-open-sqlite-database-from-javascript .... – Saurabh Gokhale Apr 30 '12 at 05:38

1 Answers1

0

This is a popular bug and I don't know why Android Team doesn't fix it. You should use this way to check if your database exist:

public boolean databaseExist()
{
    File dbFile = new File(DB_PATH + DB_NAME);
    return dbFile.exists();
}
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165