My application has an SQLite database in its asset folder. When a user launches my application, a database and tables are created.
This works great with many devices (Nexus One, HTC Magic, SGS, X10 ... and even HTC Desire HD v2.2). My application works with all versions of Android (tested on my device (1.6, 2.2, 2.2.1 Htc Magic) and on the emulator (v1.5 to v2.3).
I only have a problem with HTC DESIRE HD v2.2.1 1.72.405.3.
Log Code:
android.database.sqlite.SQLiteException: no such table: LISTE: at compilation: select _id from LISTE at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2833) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2854 ) at android.app.ActivityThread.access $ 2300 (ActivityThread.java:136) at android.app.ActivityThread $ H.handleMessage (ActivityThread.java:2179) on android.os.Handler.dispatchMessage (Handler.java:99) on android.os.Looper.loop (Looper.java:143) at android.app.ActivityThread.main (ActivityThread.java:5068) in java.lang.reflect.Method.invokeNative (native method) in java.lang.reflect. Method.invoke (Method.javaPoint21) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616) in dalvik.system.NativeStart.main (native method) Called: android.database.sqlite.SQLiteExcept ion: no such table: LISTE: at compilation: select _id from LISTE in the file android.database.sqlite.SQLiteCompiledSql.native_compile (native method) in the file android.database.sqlite.SQLiteCompiledSql.compile (SQLiteCompiledSql.java:91) in the file android.database.sqlite.SQLiteCompiledSql. (SQLiteCompiledSql.java:64) in android.database.sqlite.SQLiteProgram. (SQLiteProgram.java:80) in android.database.sqlite.SQLiteQuery. (SQLiteQuery.java:46) in android.database.sqlite.SQLiteDirectCursorDriver.query (SQLiteDirectCursorDriver.java:53) in android.database.sqlite.SQLiteDatabase.rawQueryWithFactory (SQLiteDatabase.java:1417) in android.database.sqlite.qliteSQL rawQuery (SQLiteDatabase.java:1387) ... 11 more
My application creates a database, but it does not copy the file tables of the resource folder to data\data\packagename\databases\mydatabase .
My code is:
public void createDataBase() throws IOException{ boolean dbExist = checkDataBase(); if(dbExist){
I think the copydatabase function has a problem, but I do not see.
This code works great with all devices except HTC DESIRE HD v2.2.1 1.72.405.3.
What problems can arise here for HTC Desire with the above version? How can this be fixed?
William
source share