Error prompt Code:
caused by:java.lang.NoSuchMethodException: <init> [Class Android.content.Context, interface Android.util.AttributeSet]
1. Cause of Error:
No constructors with (Context Context,attributeset attrs) were rewritten when customizing view
Workaround:
Re-for constructors, for example:
Public Controlkeyboardlinearlayout (Context context,attributeset attrs) {
Super (context, attrs);
}
2. Cause of Error:
When a custom view is an inner class, the inner class is not set to static, for example:
public class a{
public Class B extents textview{
...
}
}
Workaround:
Add the static keyword to the inner class, for example:
public class a{
Public Static Class B extents textview{
...
}
}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Caused by:java.lang.NoSuchMethodException: <init> [Class Android.content.Context, Interface Androi