1

I get the error in the title when i run my application, I have checked the forums but all my Edit, text views are closed. I dont really understand what the problem is, everything looks fine to me.

<EditText
     android:id="@+id/fairgroundName"/>
 <EditText
     android:id="@+id/rideName"/>


ride =(EditText)findViewById(R.id.rideName);
fairground =(EditText)findViewById(R.id.fairgroundName);

But I don't get what the problem is. Can anyone help please

Laurence Nicolaou
  • 569
  • 2
  • 8
  • 28

2 Answers2

6

Your code looks fine to me too. Looks like the code for your EditText was not generated properly in R.java.

Clean the project. Hopefully, it would remove the error.

Project -> Clean

Don't forget to uninstall the application from the phone before you try running it again.

Swayam
  • 16,294
  • 14
  • 64
  • 102
0

Do you change The order of your views in layout file? Sometimes doing it cause this error. As swayam said do a Project -> Clean to regenerate your R.

eltabo
  • 3,749
  • 1
  • 21
  • 33