Autore Topic: errore sqlite  (Letto 480 volte)

Offline yoshi

  • Nuovo arrivato
  • *
  • Post: 30
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    LG Optimu Black (P970)
  • Sistema operativo:
    Mac OS X 10.7
errore sqlite
« il: 22 Gennaio 2012, 19:24:10 CET »
0
salve a tutti, ho un piccolo problema:

la mia app funziona perfettamente sull'emulatore ma quando la metto sul dispositivo all'avvio crasha... ecco il logcat che ho preso dal dispositivo:

Citazione
01-22 18:33:36.476 D/dalvikvm(10715): GC_EXTERNAL_ALLOC freed 94K, 47% free 2870K/5379K, external 2702K/2784K, paused 40ms
01-22 18:33:36.507 I/activity(10715): [AprofActivity.java:74:onCreate()] ok.db ciao
01-22 18:33:36.515 I/Database(10715): sqlite returned: error code = 14, msg = cannot open file at source line 25467
01-22 18:33:36.515 E/Database(10715): sqlite3_open_v2("ok.db", &handle, 6, NULL) failed
01-22 18:33:36.546 D/AndroidRuntime(10715): Shutting down VM
01-22 18:33:36.546 W/dalvikvm(10715): threadid=1: thread exiting with uncaught exception (group=0x4001a560)
01-22 18:33:36.554 E/AndroidRuntime(10715): FATAL EXCEPTION: main
01-22 18:33:36.554 E/AndroidRuntime(10715): java.lang.RuntimeException: Unable to start activity ComponentInfo{it.lap2.project.Aprof/it.lap2.project.Aprof.AprofActivity}: android.database.sqlite.SQLiteException: unable to open database file
( 1338): mpu3050_resume: Resuming to 0070
( 1338): mpu3050_suspend: suspending sensors to 0000 ( 1338): mpu3050_suspend: Will resume next to 0070
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715): Caused by: android.database.sqlite.SQLiteException: unable to open database file
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1658) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674) at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3694)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.554 E/AndroidRuntime(10715):
01-22 18:33:36.570 V/GsmDataConnectionTracker( 1453): [GsmDataConnectionTracker.java:4390:run()] Data transfer check is on and current inactivity time is 5 seconds per netStatPollPeriod:1000 01-22 18:33:36.570 D/GsmDataConnectionTracker( 1453): [GsmDataConnectionTracker.java:4452:run()] Fast dormancy check PDP num =1
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1850)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:821)
at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:855) at it.lap2.project.Database.MyDatabase.createTables(MyDatabase.java:41)
at it.lap2.project.Aprof.AprofActivity.onCreate(AprofActivity.java:75)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
... 11 more


spero qualcuno riesca ad aiutarmi

Offline Ricky`

  • Amministratore
  • Utente storico
  • *****
  • Post: 3489
  • Respect: +507
    • Github
    • Google+
    • rciovati
    • Mostra profilo
R: errore sqlite
« Risposta #1 il: 22 Gennaio 2012, 20:02:57 CET »
0
Doppio

Offline yoshi

  • Nuovo arrivato
  • *
  • Post: 30
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    LG Optimu Black (P970)
  • Sistema operativo:
    Mac OS X 10.7
Re:errore sqlite
« Risposta #2 il: 22 Gennaio 2012, 20:04:07 CET »
0
lo so ma volevo risolvere il prob e nessuno mi ha più considerato... scusatemi tanto!

Offline Ricky`

  • Amministratore
  • Utente storico
  • *****
  • Post: 3489
  • Respect: +507
    • Github
    • Google+
    • rciovati
    • Mostra profilo
Re:errore sqlite
« Risposta #3 il: 22 Gennaio 2012, 20:19:41 CET »
0