0

Android アプリを作成して公開しました。とても簡単です。私の携帯電話のgamaxy noteでは問題なく動作しますが、similateurでこのエラーが発生しています:

04-14 02:15:12.830: W/KeyCharacterMap(301): No keyboard for id 0
04-14 02:15:12.830: W/KeyCharacterMap(301): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
04-14 02:15:30.280: D/Button(301): Login
04-14 02:15:32.400: D/dalvikvm(301): GC_FOR_MALLOC freed 3977 objects / 225448 bytes in 84ms
04-14 02:15:32.920: E/JSON(301): {"tag":"login","success":1,"error":0,"uid":"4f6a68429e5226.39186109","user":{"name":"othmane","email":"othmane@gmail.com","created_at":"2012-03-22 00:46:10","updated_at":"2012-04-14 04:09:45","phone":"212674966347"}}
04-14 02:15:33.030: I/Database(301): sqlite returned: error code = 1, msg = duplicate column name: email
04-14 02:15:33.030: E/Database(301): Failure 1 (duplicate column name: email) on 0x2a2368 when preparing 'CREATE TABLE login(id INTEGER PRIMARY KEY,name TEXT,email TEXT UNIQUE,uid TEXT,created_at TEXT,email TEXT UNIQUE)'.
04-14 02:15:33.040: D/AndroidRuntime(301): Shutting down VM
04-14 02:15:33.040: W/dalvikvm(301): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-14 02:15:33.080: E/AndroidRuntime(301): FATAL EXCEPTION: main
04-14 02:15:33.080: E/AndroidRuntime(301): android.database.sqlite.SQLiteException: duplicate column name: email: CREATE TABLE login(id INTEGER PRIMARY KEY,name TEXT,email TEXT UNIQUE,uid TEXT,created_at TEXT,email TEXT UNIQUE)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1727)
04-14 02:15:33.080: E/AndroidRuntime(301):  at com.estm.Library.DatabaseHandler.onCreate(DatabaseHandler.java:44)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:106)
04-14 02:15:33.080: E/AndroidRuntime(301):  at com.estm.Library.DatabaseHandler.resetTables(DatabaseHandler.java:120)
04-14 02:15:33.080: E/AndroidRuntime(301):  at com.estm.Library.UserFunctions.logoutUser(UserFunctions.java:99)
04-14 02:15:33.080: E/AndroidRuntime(301):  at com.estm.Ehesms.LoginActivity$waiting.onPostExecute(LoginActivity.java:101)
04-14 02:15:33.080: E/AndroidRuntime(301):  at com.estm.Ehesms.LoginActivity$waiting.onPostExecute(LoginActivity.java:1)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.os.AsyncTask.finish(AsyncTask.java:417)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.os.AsyncTask.access$300(AsyncTask.java:127)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.os.Looper.loop(Looper.java:123)
04-14 02:15:33.080: E/AndroidRuntime(301):  at android.app.ActivityThread.main(ActivityThread.java:4627)
04-14 02:15:33.080: E/AndroidRuntime(301):  at java.lang.reflect.Method.invokeNative(Native Method)
04-14 02:15:33.080: E/AndroidRuntime(301):  at java.lang.reflect.Method.invoke(Method.java:521)
04-14 02:15:33.080: E/AndroidRuntime(301):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-14 02:15:33.080: E/AndroidRuntime(301):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-14 02:15:33.080: E/AndroidRuntime(301):  at dalvik.system.NativeStart.main(Native Method)
04-14 02:20:33.179: I/Process(301): Sending signal. PID: 301 SIG: 9
4

1 に答える 1

1

「CREATE TABLE login(id INTEGER PRIMARY KEY,name TEXT,email TEXT UNIQUE,uid TEXT,created_at TEXT,email TEXT UNIQUE)」を準備するとき。

テーブルの作成中に、SQL で email 列名を 2 回使用しました。

sqlite returned: error code = 1, msg = duplicate column name: email 04-14 02:15:33.030: E/Database(301): Failure 1 (duplicate column name: email)

これがあなたを助けることを願っています。

于 2012-04-14T02:54:04.320 に答える