我的应用在“ android.database.sqlite.SQLiteException”上崩溃
在“ where”子句中的SQL查询中,有一些我没有添加的代码,并且生成了)(storage_id = 65537)之间的错误,没有OR / AND:
(
(mime_type IS NULL)
OR (
mime_type NOT IN(
'application/vnd.oma.drm.message',
'application/vnd.oma.drm.content',
'application/vnd.oma.drm.dcf'
)
)
)(storage_id = 65537)
所以我有2个问题:
我以这种方式使用ContentResolver:
context.getContentResolver().query(uri, projection,
selection, null,
MediaStore.MediaColumns.DATE_ADDED);
错误代码:
Fatal Exception: android.database.sqlite.SQLiteException: near "(":
syntax error (code 1): , while compiling:
SELECT arg1, arg2, arg3 FROM files WHERE ( ((mime_type IS NULL) OR
(mime_type NOT
IN('application/vnd.oma.drm.message',
'application/vnd.oma.drm.content',
'application/vnd.oma.drm.dcf')))(storage_id=656146433 OR
storage_id=65537)) AND myWhere ORDER BY date_added