Hello, I am using Android Studio 3.0.1 and the TextView marks it on red as an error, says
Function invocation 'TextView (...)' expected None of the following functions can be called with the arguments supplied. (Context!) defined in android.widget.TextView (Context !, AttributeSet!) defined in android.widget.TextView (Context !, AttributeSet !, Int) defined in android.widget.TextView (Context! AttributeSet !, Int, Int) defined in android.widget.TextVie
The operator = brand
Expecting an element
And calling the variable myText to implement the setText () method marks
Unresolved reference: miText
Here is the MainActivity.kt code
package holamundo.programming.app.tuto.com.myapplication
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main);
TextView miTexto = (TextView)findViewById(R.id.textView);
miTexto.setText("He cambiado");
}
}
I really saw several videos and I read in several pages but they all do the same thing and it does not work for me, it will be the IDE version ??