SoFunction
Updated on 2025-04-07

A brief discussion on the issue of Volley not loading pictures

Problem analysis: When loading the background image, I found that it could not be loaded. Later, I found that the url format of the image is:

http://192.168.1.71/\carhome\shop\778c2bc3ec0a49e1969b24b3a8e62f31\detail\

Because Volley requests, the URL does not recognize that there is "\"

So you need to replace "|" with "/"

The following are the tools

public class StringUtil {

  public static String formatUrl(String s) {
    String str = null;
    if (s != null && ("\\")) { //\ is an escape character in java. You must use \\ when using \      str = ("\\", "/");
      return str;
    }else {
      return s;
    }
  }
}

The above article briefly talks about the problem that Volley cannot load pictures is all the content I share with you. I hope it can give you a reference and I hope you can support me more.