URLS为什么是空的/Android异步处理
public Myadapter(Context context, ArrayList<HashMap<String, String>> array, ListView listview) { this.context = context; this.array = array; mImageLoader = new ImageLoader(listview); URLS = new String[array.size()];//空间大小 for (int i = 0; i < array.size(); i++) { URLS[i] = array.get(i).get("thumbnail_pic_s"); Log.e("tag",""+array.get(i).get("thumbnail_pic_s")); }
URLS为什么是空的? if (Myadapter.URLS.length>0){ String url = Myadapter.URLS[i];//这就走不了了
报错
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at com.example.yanchenglong.ImageLoader.loadImages(ImageLoader.java:115)