I was testing the first app (see http://developer.android.com/training/basics/firstapp/starting-activity.html)
at a point,I stuck..
it shows:
Multiple markers at this line
– MyFirstActivity cannot be resolved to a variable
– EXTRA_MESSAGE cannot be resolved or is
not a field
(see heading DISPLAY THE MESSAGE)
// I FOUND THE ABOVE GIVEN ERROR MESSAGE HERE
String message = intent.getStringExtra(MyFirstActivity.EXTRA_MESSAGE);
HOW CAN I RESOLVE THIS?
THANK YOU
You haven’t defined
MyFirstActivityandEXTRA_MESSAGE.Did you add
public final static String EXTRA_MESSAGE = "com.example.myapp.MESSAGE";as it says in the tutorial? Check thatMyFirstActivityis the name of your activity as well.