Android showing the error: activity_name cannot be resolved or is not a field

When trying to build android if you get a message like:
activity_main cannot be resolved or is not a field

In general:
<activity name> cannot be resolved or is not a field

Then it become difficult to get the exact cause! Don’t worry there is a simple solution for this.

Solution

Just delete:

import android.R;

and rebuild. You are done 🙂

= 🙂 = Happy Coding = 🙂 =

Advertisements

One thought on “Android showing the error: activity_name cannot be resolved or is not a field

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: