今天头脑有点蒙。做一个listview图文混排的例子,用AsyncTask
conn.setDoInput(true);
conn.setDoOutput(true);
然后运行后报错。
public Bitmap downLoadImage() {
Bitmap bitmap = null;
HttpURLConnection conn = null;
try {
URL url = new URL(imageUrl);
conn = (HttpURLConnection) url.openConnection();
//这里可以不设置他们
//conn.setDoInput(true);
//conn.setDoOutput(false); setdoinput(true),setdooutput(false