通过objectId解析保存ParseGeoPoint失败,使用" com.parse.ParseRequest $ ParseRequestException:"

时间:2016-12-08 04:44:20

标签: java android parse-platform objectid

通过objectId通过Android应用程序将instructions here数据保存到对象并获取errmsg com.parse.ParseRequest$ParseRequestException:(分号后没有任何内容)。我已确认objectId如解析仪表板所示。有人可以帮我弄清楚我做错了什么吗?感谢

final String parseRequest = "Request";
final String parseRequestDriverLocation = "driverLocation";

private void saveDriverLocation(String objectId, Location driverLocation) {
  Log.i("saveDriverLocation", "objectId=" + objectId + ", driverLocation=" + driverLocation.toString());

  ParseGeoPoint locationDriverParse = new ParseGeoPoint(driverLocation.getLatitude(), driverLocation.getLongitude());
  ParseObject acceptedRequest = ParseObject.createWithoutData(parseRequest, objectId);

  Log.i("saveDriverLocation", "acceptedRequest=" + acceptedRequest.toString() + "\nlocationDriverParse=" + locationDriverParse.toString());

  acceptedRequest.put(parseRequestDriverLocation, locationDriverParse);
  acceptedRequest.saveInBackground(new SaveCallback() {
    @Override
    public void done(ParseException e) {
      if (e == null) {
        Log.i("saveDriverLocation", "driver location saved successfully");
      } else {
        Log.i("saveDriverLocation", "saving driver location failed... " + e.toString());
      }
    }
  });
}

logcat:

I/saveDriverLocation: objectId=Ddm73yXhPC, driverLocation=Location[gps 41.677770,-80.385998 acc=20 et=+1d7h59m59s883ms alt=18.0 {Bundle[mParcelledData.dataSize=40]}]
I/saveDriverLocation: acceptedRequest=com.parse.ParseObject@ddeb183
locationDriverParse=ParseGeoPoint[41.677770,-80.385998]
I/saveDriverLocation: saving driver location failed... com.parse.ParseRequest$ParseRequestException:

1 个答案:

答案 0 :(得分:0)

显然,Parse类只能有一个ParseGeoPoint列!这是reference