android.view.InflateException异常处理

来源:互联网 发布:重庆八中数据谷中学 编辑:程序博客网 时间:2024/05/16 08:41
<com.wm.MyImageSwitcher        android:id="@+id/iSwitcher"        android:layout_width="fill_parent"        android:layout_height="fill_parent"                />
MyImageSwitcher类的前面加上包名了,但是还是报错:android.view.InflateException: Binary XML file line #5: Error inflating class com.wm.MyImageSwitcher
MyImageSwitcher中加上
public MyImageSwitcher(Context context, AttributeSet attrs) {super(context, attrs);// TODO Auto-generated constructor stub}
方法后,异常解除