Lalit_vicky
Lalit_vicky

Reputation: 295

References to R files shows error in Android

It's my 3rd day in Android dev. Just now my app. was working fine but instatntly all refrences to my R file started showing error. It was working fine couple of mins back.

Even the code like below , generated by ADK was working fine and now it shows the error

Code Snipppet:

@Override
        public CharSequence getPageTitle(int position) {
            Locale l = Locale.getDefault();
            switch (position) {
            case 0:
                return getString(R.string.title_Venue).toUpperCase(l);
            case 1:
                return getString(R.string.title_Teams).toUpperCase(l);
            case 2:
                return    getString(R.string.title_WeatherConditions).toUpperCase(l);
            }
            return null;
        }

Tried cleaning and rebuilding the soluition , no luck.

Kindly help.

Lalit

Upvotes: 1

Views: 256

Answers (1)

Lia Pronina
Lia Pronina

Reputation: 756

import should look like this:

import your.package.name.R;

and check xml files for errors please

Upvotes: 2

Related Questions