01-01 02:52:04.780: ERROR/AndroidRuntime(5299): java.lang.RuntimeException: Unable to start activity ComponentInfo{test.other/test.other.music.MusicPlayerActivity}: android.view.InflateException: Binary XML file line #76: Error inflating class test.other.music.VisualizerView
01-01 02:52:04.780: ERROR/AndroidRuntime(5299): Caused by: android.view.InflateException: Binary XML file line #76: Error inflating class test.other.music.VisualizerView
这个错误是:这个自定义的View没有实现部分构造函数所致,不知道这样解释对不?但是我把构造函数全部实现后,就不报错了。
public VisualizerView(Context context) {
super(context);
// TODO Auto-generated constructor stub
init();
}
public VisualizerView(Context context, AttributeSet attrs) {
super(context, attrs);
// TODO Auto-generated constructor stub
}
public VisualizerView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// TODO Auto-generated constructor stub
}