SQLite查询中无法识别的标记

时间:2017-08-04 11:26:02

标签: android

我正在SQLite中进行查询,我想要记录创建日期大于创建日期的记录 我的查询是:

String selection=String.valueOf(new Date().getTime());
        String[] selectionArgument = {selection};

        ContentResolver contentResolver = context.getContentResolver();
        Cursor urlDownload = contentResolver.query(
                StubContract.Schedule.schedule_uri, StubContract.Schedule.PROJECTION_MESSAGE,
                StubContract.Schedule.CREATE_DATE+">=?",
              selectionArgument,
                null);

,错误日志为:

enter image description here

请帮助解决此错误的方法

1 个答案:

答案 0 :(得分:0)

只需更改

String[] selectionArgument = {selection};

String[] selectionArgument = new String[]{selection};