0
私のコードが自分の携帯電話で正常に動作するという面白い問題がありますが、エミュレータで実行しているときに、アプリケーションがデータベースから値を取得しようとするとクラッシュします。ここで AndroidのSQLiteはエミュレータでクラッシュしますが、電話はクラッシュしませんか?
はそれを/** Used to retrieve our lowest stored val */
public int GetLowestVal(){
// Get our databases results
Cursor result = null;
try {
// Get our databases results
result = super.getAll();
} catch(SQLException anyDbError) {
// Errors? TODO
} finally {
// Finally TODO
}
// Setup initial lowest val
int lowestVal = 0;
// Move through results and compare them
while(result.moveToNext()){
// Get our place from the DB
int index = Integer.parseInt(result.getString(1).trim());
// Last index should be lowest
if (index == 10){
lowestVal = Integer.parseInt(result.getString(3).trim());
}
}
// Return our value
return lowestVal;
}
をクラッシュされたDBヘルパー関数であり、それはスローエラーは次のとおりです。
getWriteableDatabase()を再帰的に呼ばれていました。そのことについて申し訳ありません
完全なスタックトレースをご覧ください。 –
申し訳ありませんが、logcatの出力を意味しますか? –