有人可以帮助我吗?我有一个错误,但我不知道为什么:
W / ImageView:坏位图uri上的resolveUri失败:
E / BitmapFactory:无法解码流: java.io.FileNotFoundException:(无此类文件或目录)
这是我的代码:
public void chargement() {
listItem = new ArrayList<HashMap<String, String>>();
for (int i = 0; i < list.size(); i++) {
map = new HashMap<String, String>();
map.put("titre", list.get(i).getTitre());
map.put("url", list.get(i).getUrl());
map.put("img", String.valueOf(getResources().getIdentifier(list.get(i).getUrl(), "drawable", getApplicationContext().getPackageName())));
if (list.get(i).getEtoile1().equals("true")) {
map.put("et1", String.valueOf(R.drawable.etoile));
}
if (list.get(i).getEtoile2().equals("true")) {
map.put("et2", String.valueOf(R.drawable.etoile));
}
if (list.get(i).getEtoile3().equals("true")) {
map.put("et3", String.valueOf(R.drawable.etoile));
}
map.put("categorie", list.get(i).getNomCategorie());
listItem.add(map);
}
mSchedule = new SimpleAdapter(this.getBaseContext(), listItem, R.layout.categorie,
new String[]{"img", "titre", "et1", "et2", "et3"}, new int[]{R.id.img, R.id.titre, R.id.etoile1, R.id.etoile2, R.id.etoile3});
maListViewPerso.setAdapter(mSchedule);
}