I\'m getting the following error, and I have no idea why it is occurring. I was wondering if anyone else might be able to shed some light on the issue.
12-2
In my case I had the question mark inside single quotes like this '?'. Removing the single quotes resolved the error.
Copied from theblang's comment above.
The selection
should be an expression and selectionArgs
should have as many elements as there are ?
literal placeholders in selection
.
Your selection
is not an expression and does not have any ?
but you have one element in selectionArgs
.
You probably want something like:
String selection = PlayerEntry.COLUMN_NAME_PLAYER_NAME + "=?";
to make it an expression that matches the player name column agains the literal you're binding in selectionArgs[0]
.