https://kotlinlang.org logo
#android
Title
# android
d

dzakens

11/27/2017, 8:09 PM
I have created custom view with such constructors @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : super(context, attrs, defStyleAttr) { initViews(attrs) } @TargetApi(21) constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) { initViews(attrs) } and i get these errors Error:(28, 85) None of the following functions can be called with the arguments supplied: public constructor LinearLayout(p0: Context!) defined in android.widget.LinearLayout public constructor LinearLayout(p0: Context!, p1: AttributeSet!) defined in android.widget.LinearLayout Error:(31, 102) None of the following functions can be called with the arguments supplied: public constructor LinearLayout(p0: Context!) defined in android.widget.LinearLayout public constructor LinearLayout(p0: Context!, p1: AttributeSet!) defined in android.widget.LinearLayout has anyone run into similar issue?