getDownloadUrl()不起作用,“ HTTP未知错误”

时间:2019-06-05 09:07:56

标签: android firebase

我的代码有问题,我尝试从Firebase存储下载图像。而且我正在尝试将图像放入ImageView中。

protected void onPostExecute(JSONObject test) {
    // dismiss the dialog once got all details
    pDialog.dismiss();
    try {
            make.setText(test.getString(TAG_MAKE));
            model.setText(test.getString(TAG_MODEL));
            type.setText(test.getString(TAG_TYPE));
        } catch (JSONException e) {
            e.printStackTrace();
        }
}

1 个答案:

答案 0 :(得分:0)

这是加载图像的方式,我不确定您是否可以将uri设置为图像uri,因为它无法解码,但是我会使用Glide,Fresco,Picasso等图像加载库来加载uri。

tableA         table B               table C

id | att1      id | att1 | att2      fk_A | fk_b
-----------   -------------------    ------------
 1 | ab123     1 | Henry | 100.0        1 | 1 
 2 | adawd     2 | Jessi | 97.0         2 | 1
 3 | da3wf     4 | Erica | 11.2   

- Note that id=3 was merged/deleted from table B and the same id
  was updated on table C to point to the merged record's id.