URLConnection getContent() return null
问题 I use the following method to get a bitmap input stream: private InputStream getInputStream(String urlString) throws MalformedURLException, IOException { URL url = new URL(urlString); URLConnection connection; connection = url.openConnection(); //connection.setUseCaches(true); Object response = connection.getContent(); if (!(response instanceof InputStream)) throw new IOException("URLConnection response is not instanceof InputStream"); return (InputStream)response; } It works great on Android