简体   繁体   English

使用 Java 的 Android 不会使用 picasa 依赖显示图像

[英]Android using Java won't display image using picasa dependence

Line of code in java codes to retrieve image path java代码中的一行代码来检索图像路径

jsonObject.getString("image"); // this is the path

My JSON file我的 JSON 文件

  "image":"/Users/jz/Desktop/RwandanMeal/Omellete.jpg"
} ```

## Result in logcat

``` {
 "image":"\/Users\/jz\/Desktop\/RwandanMeal\/ugari.jpg"
} ```

As you see my path has been manipulated and it could be the reason 

删除反斜杠

jsonObject.getString("image").replace("\\","");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM