How Can I Resolve "cannot Find Symbol ... " In Android Studio
I'm trying to learn android on android developer website. However I encounter an error when following their lecture. It seems that the findViewByID cannot resolve R.id.editText des
Solution 1:
Just do one thing , remove this from sendMessage function and
EditTexteditText= (EditText) findViewById(R.id.editText);
place this line right below setContentView(R.____);
I guess , this will solve your problem
Solution 2:
It seems that the findViewByID cannot resolve R.id.editText
You are probably missing to define EditText
id as editText
.
<EditText
.....
android:id="@+id/editText"
.....
/>
YourCurrentActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
......
}
Post a Comment for "How Can I Resolve "cannot Find Symbol ... " In Android Studio"