i would like to ask how can i solve this problem ..
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
textOut =(TextView) findViewById(R.id.tvGetInput);
getInput = (EditText) findViewById(R.id.etInput);
Button ok = (Button) findViewById (R.id.bOk);
ok.setOnClickListener(new View.OnClickListener() {
(the tvGetInput, etInput ,bOk has the error) it says "cannot be resolve or is not a field"
first , clean an re-build your project like this :
Project ==> Clean ==> Check your project and press OK.
second , verify your imports, if there is the import android.R
, delete it , you should import the R of your project :
example : import com.test.R;
Regards
Check your imports. There shan't be android.R
. Also check if you declared these ids in your main
layout. If all is ok, clean and build your project.
精彩评论