android - issues with file ...resource not found...cannot be resolved to a varaible

Whenever I create a project, I am having issues with my .java file whenever I reference a textview via get these errors cannot be resolved to a variable...

package COG__R_JAVA__12_11_2011;

import android.os.Bundle;

public class COG__R_JAVA__12_11_2011Activity extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {

r.layout.main >>>>cannot convert to a varailbe.....
LVL 10
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I only know this message, when there is no main.xml-file in the layout-directory or the source code is referencing to an object in these layout-files which is not (yet) existing.
Error when no main-layout is existingUsually in my android installation when I choose "File"=>"New..."=>"Other..."=>"Android"=>"Android Project" a layout file called main.xml is created automatically. You should verify that and if it does not exist then you can create one by rightclicking the layout directory and choose "New..."=>"Other..."=>"Android"=>"Android XML File". If it does exist and the error persists then there is something else wrong with your installation. Maybe try to reinstall the android SDK.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GlobaLevelProgrammerAuthor Commented:
wow got that hard is it to redirect to a new page(activity)..every link I look for more than one line of code...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.