I am new to android and making my first application.
I have a problem resolving R.layout.main
The main is auto generated in my res/layout.
I have already imported android.R
but it is still not resolving “main”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are creating a new application for android in eclipse, then R.java file is auto generated in your application’s
/gendirectory, And yourR.layout.mainis resolved automatically, For that you don’t have to import any R file in your activity class..Just remove android.R any any other R file import statements, Clean and rebuild your project it works fine..
Also make sure Your project doesn’t have a any error, If its present then it s prevent to generate
R.javafile in/gendirectory..