只在HTC Sensation XL上获取名为递归错误的数据库

时间:2012-11-02 20:48:09

标签: android sql sqliteopenhelper

我正在开发一个导入数据库的应用程序,如本教程中所示:http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

这在大多数设备上都能正常工作,只有在HTC Sensation XL上才能正常工作。

感谢您的帮助

这是错误代码

11-02 21:35:33.748:W / System.err(14878):java.lang.IllegalStateException:递归调用getReadableDatabase 11-02 21:35:33.748:W / System.err(14878):在android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:245) 11-02 21:35:33.748:W / System.err(14878):at at.klettern.database.DatabaseHelper.createDataBase(DatabaseHelper.java:54) 11-02 21:35:33.748:W / System.err(14878):at at.klettern.database.DatabaseHelper.onCreate(DatabaseHelper.java:148) 11-02 21:35:33.758:W / System.err(14878):在android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:183) 11-02 21:35:33.758:W / System.err(14878):在android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:249) 11-02 21:35:33.758:W / System.err(14878):at at.klettern.database.DatabaseRouten。(DatabaseRouten.java:39) 11-02 21:35:33.758:W / System.err(14878):at at.klettern.wachauclimbing.SplashActivity.onCreate(SplashActivity.java:28) 11-02 21:35:33.758:W / System.err(14878):在android.app.Activity.performCreate(Activity.java:4531) 11-02 21:35:33.768:W / System.err(14878):在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071) 11-02 21:35:33.768:W / System.err(14878):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150) 11-02 21:35:33.768:W / System.err(14878):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229) 11-02 21:35:33.768:W / System.err(14878):在android.app.ActivityThread.access $ 600(ActivityThread.java:139) 11-02 21:35:33.768:W / System.err(14878):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1261) 11-02 21:35:33.778:W / System.err(14878):在android.os.Handler.dispatchMessage(Handler.java:99) 11-02 21:35:33.778:W / System.err(14878):在android.os.Looper.loop(Looper.java:154) 11-02 21:35:33.778:W / System.err(14878):在android.app.ActivityThread.main(ActivityThread.java:4945) 11-02 21:35:33.778:W / System.err(14878):at java.lang.reflect.Method.invokeNative(Native Method) 11-02 21:35:33.778:W / System.err(14878):at java.lang.reflect.Method.invoke(Method.java:511) 11-02 21:35:33.788:W / System.err(14878):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:784) 11-02 21:35:33.788:W / System.err(14878):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 11-02 21:35:33.788:W / System.err(14878):at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:1)

此设备上运行的是哪个Android版本? [我在Android 2.1或更低版本中发现了一些致命错误。]

否则,我已经能够蚕食你引用的大部分教程,并且从2.2及以上它可以完美运行。