parse平台android添加/放置独立的行而不是数组行

t30tvxxf  于 2021-07-08  发布在  Java
关注(0)|答案(0)|浏览(255)

我对android的解析平台有问题。当nutrientid上传时(见下面的add),它会为每个添加的项目创建一个行数组,而不是一个新行。

ParseObject a6 = new ParseObject("c5");
BufferedInputStream bufferedInputStream = new BufferedInputStream(getResources().openRawResource(R.raw.filename));
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(bufferedInputStream));

 try {
      String line;
      int iteration = 0;
      String [] nextLine;
      while ((line = bufferedReader.readLine()) != null) {
        if (iteration == 0) {
          iteration++;
          continue;
        }
        String[] cols = line.split(",");
        a6.add("NutrientID", cols[0]); 
}
a6.saveInBackground(new SaveCallback() {
          @Override
          public void done(ParseException e) {
            if (e == null) {
              Log.i("Parse", "Success");
            } else {
              Log.i("parse", e.toString());
            }
          }
        });
 } catch (IOException e1) {
      e1.printStackTrace();
    }
 ParseAnalytics.trackAppOpenedInBackground(getIntent());
  }
}

阵列行图像
编辑:样本数据位于https://drive.google.com/file/d/1v0gihnhs82d5rhj6bun1m_unoyknaikt/view?usp=sharing
put的简单示例

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题