1

Possible Duplicate:
Developing for Android in Eclipse: R.java not generating

I have a one problem in my eclipse, I have done one project I want to put some images and videos. I drag and drop this images in drawable-hdpi. But when i come to my main.java and Write (R.drawable.) than images are not dispayed. Is my eclipse currupt?? Which one is good eclipse version for android development??

Community
  • 1
  • 1
Dharmik
  • 2,325
  • 3
  • 27
  • 37

2 Answers2

4

I'm assuming you have not selected 'Build Automatically' option in Eclipse. In that case, the ids of the new drawables wont get generated automatically. (unless you build the project) So, just refresh your drawable-hdpi folder from the eclipse (by right clicking it) and then Clean-->Build. The ids will get generated.

Saurabh Verma
  • 6,328
  • 12
  • 52
  • 84
  • When I was taking 'textview' or other component in my layout and if it do not display me that component (by r.id.) then i just run the project and displays me that clear errors first, after that message textview places in r.java. But now it also not work for me at this time.. and I refreshed my full project even restart eclipse than also images are not placed in R.java file. – Dharmik Dec 16 '11 at 11:36
  • Try deleting the gen folder and then clean-->build. Also just confirm that on the 'clean' dialog 'Build Automatically' option is selected. – Saurabh Verma Dec 16 '11 at 12:14
1

Try cleaning or building your project, it should update accordingly.

chamel
  • 367
  • 4
  • 16