无法检测应用程序崩溃的原因。变量StartDate
和lastTimeCalculateValues
很长。
Cursor c = MyApplicationExtendsClass.database.rawQuery("SELECT * FROM " + MyApplicationExtendsClass.locationTableName + " WHERE [Date] >= '" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US).format(StartDate) + "' AND [Date] <= '" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US).format(lastTimeCalculateValues) + "' ORDER BY Id ASC", null);
来自谷歌游戏控制台的崩溃输出,5% 的活跃用户,这就是我得到的全部。
android.database.sqlite.SQLiteException:
at android.database.sqlite.SQLiteConnection.nativePrepareStatement (Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement (SQLiteConnection.java:948)
at android.database.sqlite.SQLiteConnection.prepare (SQLiteConnection.java:559)
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:46)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory (SQLiteDatabase.java:1493)
at android.database.sqlite.SQLiteDatabase.rawQuery (SQLiteDatabase.java:1427)
at my.packagename.MainActivity.calculateValuesFinalFromDb (MainActivity.java:4013)
at my.packagename.MainActivity.access$1800 (MainActivity.java:152)
at my.packagename.MainActivity$CalculateValuesTimer.run (MainActivity.java:4112)
at java.util.TimerThread.mainLoop (Timer.java:562)
at java.util.TimerThread.run (Timer.java:512)
日期时间的SQLite 文档 SQLite 文档
A time string can be in any of the following formats:
YYYY-MM-DD
YYYY-MM-DD HH:MM
YYYY-MM-DD HH:MM:SS
YYYY-MM-DD HH:MM:SS.SSS
YYYY-MM-DDTHH:MM
YYYY-MM-DDTHH:MM:SS
YYYY-MM-DDTHH:MM:SS.SSS
HH:MM
HH:MM:SS
HH:MM:SS.SSS
now
DDDDDDDDDD
文档说yyyy-MM-dd HH:mm:ss.SSS可以使用