android - R cannot be resolved to a variable, rebuilding doesn't solve -
Can someone help me?
Public class uses Maths4to5Home activity OnClickListener {Personal Button button_4 to5PlayGame, Button_Math Instructions, Button-10 to 5 Scours; Protected void onCreate (bundled saved instenstate) {super.onCreate (SavedInstanceState); SetContentView (R.layout.activity_maths4to5home); // Error Button +05 Play Game = (Button) Find VVBIID (R. Button .05 Play Play); // Error button_mind_display instructions = (button) ViewById (R.id.button_mathsInstructions); // Error Button +05 Scours = (Button) Find VVBIID (R.D.B.ton Butticosaurus); // error
I have included a sample of the above code and highlighted where my errors are. I am constantly being told that r
is in any variable Can not be solved I have tried cleaning and reconstruction. Apart from this, I have tried to import R
(as the quick correction suggests) but then I have been told that in my setContentView ()
Correct you r
& mdash; Specifically, for your project, this is based on what is in your project's manifest if your manifest declares the package of the project to be com.example.my_project
then you get the import Please com.example.my_project.R;
.
If necessary, your activity is already in the project package, then you do not need to import R
However, especially you no Import Android. R
is required.
The error message may also be due to RJVA. It may happen that in your resources the errors prevent RAJA from generating errors. You should see that there are no errors from your resource files.
Comments
Post a Comment