Android android.database.sqlite.SQLiteException: 認識されないトークン: “1704266282226.jpg” (コード 1):

元のエラーメッセージ

android.database.sqlite.SQLiteException: unrecognized token: "1704266282226.jpg" (code 1): , while compiling: select *from cloud_album_table where photoName = 1704266282226.jpg

間違った書き方

final String sql ="select *from cloud_album_table where photoName = 1704266282226.jpg";
Cursor cursor = db.rawQuery(sql, null);

正しい書き方

final String sql ="select *from cloud_album_table where photoName = ?";
Cursor cursor = db.rawQuery(sql, new String[]{
    
    "1704266282226.jpg"});

おすすめ

転載: blog.csdn.net/qq_27494201/article/details/135365467