0

I am creating new Android application in my Eclipse.Application is created but the R.java file is not creating,I am getting errors R cannot be resolved.

IS there any issue in my android-sdk?

Thanks

moDev
  • 5,248
  • 4
  • 33
  • 63
user1891910
  • 919
  • 3
  • 18
  • 45

7 Answers7

1

Try Clean and Build if it does not work please close the eclipse and open it again It should work.

Amalan Dhananjayan
  • 2,277
  • 1
  • 34
  • 47
0

You can try following things.

1)in project tab(topbar) there is clean option try that, if your code is fine it will regenerate R.java file

2)if you imported import android.R.* statements, remove it, You should add your.project.name.R.* instead;

3) there may be errors in your xml files, check error viewer it should show errors there.

AAnkit
  • 27,299
  • 12
  • 60
  • 71
0

Check this. have you imported import android.R;in your project. If have means remove this import android.R;. clean and Rebuild your project

import android.R;
MuraliGanesan
  • 3,233
  • 2
  • 16
  • 22
0

No generated R.java file in my project. R.Java not generated. R.java file not getting generated.

When you clean and build your project R.java gets generates automatically. Try the above links.

Community
  • 1
  • 1
Raghunandan
  • 132,755
  • 26
  • 225
  • 256
0

There are 2 ways to solve this problem:

1) In Project Explorer, Right Click on your Project, then go to Build Project

2)in project tab Go to clean option, if your code is fine it will regenerate R.java file

Name is Nilay
  • 2,743
  • 4
  • 35
  • 77
0

Clean your project and try again it will help u

Kirti
  • 691
  • 8
  • 27
0

From Eclipse Menu Bar;

Enable Project -> Built -> Built Automatically

hakki
  • 6,181
  • 6
  • 62
  • 106