索引1处的绑定值在查询中为空?

ben*_*eel 2 sqlite android

我在以下查询中得到"索引1处的绑定值为空":

public String searchForWifiSSID(String one, String two){
c = db.query(Constants.TABLE_NAME, new String[]{Constants.PARAM1, Constants.PARAM2}, Constants.PARAM1 + " =? " +" AND " + Constants.PARAM2 + " =? ", new String[]{one,two}, null, null, null);
}
Run Code Online (Sandbox Code Playgroud)

我的selectionArgs语法不正确吗?这样做是不正确的:

  public String searchForWifiSSID(String one, String two){
    c = db.query(Constants.TABLE_NAME, new String[]{Constants.PARAM1, Constants.PARAM2}, Constants.PARAM1 + " = " + one +" AND " + Constants.PARAM2 + " = " + two, null, null, null, null);
    }
Run Code Online (Sandbox Code Playgroud)

Gop*_*fur 6

确保值"one"和"two"不为NULL.我相信错误意味着其中一个值为null.