Adding my custom View into an XML layout throws exception
问题 I'm trying to create my first custom View subclass GraphView and add it to my layout XML file. I found this SO question and tried to apply it to my project, but something seems to be wrong because Eclipse IDE tells me: de.muza3000.graph.GraphView failed to instantiate. and throws an exception: java.lang.NoSuchMethodException: de.muza3000.graph.GraphView.<init>(android.content.Context, android.util.AttributeSet) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class