我正在处理其他人的代码,但对android sql数据库不是很熟悉 在我的另一个系统上,它运行正常,但是当我使用该系统克隆并构建它时,它突然崩溃并显示此异常
b.js
我四处搜索并添加了 java.lang.RuntimeException: Unable to create application net.theinnotech.mahmoole.Utilities.AppController: android.database.sqlite.SQLiteException: no such table: USER (Sqlite code 1): , while compiling: SELECT * FROM USER WHERE id=? LIMIT 1, (OS error - 2:No such file or directory)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5685)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6531)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
Caused by: android.database.sqlite.SQLiteException: no such table: USER (Sqlite code 1): , while compiling: SELECT * FROM USER WHERE id=? LIMIT 1, (OS error - 2:No such file or directory)
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:910)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:521)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:603)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:63)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1397)
at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1239)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1316)
at com.orm.SugarRecord.find(SugarRecord.java:201)
at com.orm.SugarRecord.findById(SugarRecord.java:135)
at net.theinnotech.mahmoole.Utilities.AppController.onCreate(AppController.java:67)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5666)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6531)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
,还增加了清单文件中的版本数据库,但没有任何变化