本文介绍了java.lang.NoClassDefFoundError:com.squareup.picasso.Picasso的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我第一次尝试使用 Picasso
就像在官方网站示例中一样:
like in the official site example:
private void setItemBgImageUsingPicasso(View convertView) {
String imageUrl = getImageUrlFromOffer(convertView);
ImageView offerImage = ((ImageView) convertView
.findViewById(R.id.offerImage));
Picasso.with(mOffersListActivity).load(imageUrl).into(offerImage);
}
但我收到此错误:
08-09 17:37:43.309: E/AndroidRuntime(17821): java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso
08-09 17:37:43.309: E/AndroidRuntime(17821): at com.zoomer.general.ImageAdapter.setItemBgImageUsingPicasso(ImageAdapter.java:384)
推荐答案
您应该将它放在libs文件夹中,Eclipse会为您正确打包。
You should put it in libs folder and Eclipse will pack it properly for you.
或者保持原样,但转到项目属性,导出选项卡并检查库。这样Eclipse就会将它打包到最终的APK中。
Or you leave it as it is, but go to project properties, Export tab and check the library. This way Eclipse will pack it in the final APK.
这篇关于java.lang.NoClassDefFoundError:com.squareup.picasso.Picasso的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!