Having a bit of a problem with a tutorial. Getting...
# android
b
Having a bit of a problem with a tutorial. Getting errors • Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:<br/>public operator fun <T, R> DeepRecursiveFunction<TypeVariable(T), TypeVariable(R)>.invoke(value: TypeVariable(T)): TypeVariable(R) defined in kotlin • Unresolved reference: title
j
Which kind of Button are you importing?
b
@Juliane Lehmann
Copy code
import android.widget.Button
Thanks, yes having different imports for Button was what through me but got it working
Copy code
val button1 = Button(this)
button1.setLayoutParams(ConstraintLayout.LayoutParams(600, 180))
button1.text = "Button added"
layout.addView(button1)