0

I have developed my application by integrating two applications,

  • one entirely developed by myself,
  • one form an opensource project that i have modified.

Now time has come to put the two together.

But when I do this R fails to generate properly.

Please see the screen-shoot: enter image description here

Thank you for any support!!!!


EDIT EDIT EDIT EDIT EDIT EDIT

It works if I manually do the import

import com.examples.android.calendar.R;

DOES IT MAKE SENSE????

Lisa Anne
  • 4,482
  • 17
  • 83
  • 157

4 Answers4

1

If you run a clean on the project it should regenerate all the generated java files, namely R.

In Eclipse, under the Project menu, is an option build automatically. That would help you build the R.java file everytime modifications are made. The Clean... option is also there under Project.

Linga
  • 10,379
  • 10
  • 52
  • 104
1

Try to delete the bin and gen folder and rebuild the project

Dima
  • 158
  • 6
  • how you imported your project? As import->Android->Existing Android Code into Workspace or as General?? if first, do the second^^ had a same problem two days ago and re-import was my solution – Dima Oct 25 '13 at 11:22
  • since they were 2 different apps, I have simply copied the sources and the assets of one project into the other... :-/ – Lisa Anne Oct 25 '13 at 11:27
  • i think thats the problem. The second app you added uses their own R, from their MainActivity. Try to remove the bin and gen folders and remove also all imports of R class from your added source code and after rebuild of your project organize imports in that resources – Dima Oct 25 '13 at 11:34
1

first delete your R.java under gen folder

clean your project

import android.R file

shortcut cmd+shift +o for import R

Gajendra Rawat
  • 3,673
  • 2
  • 19
  • 36
  • when I do that a pop-up comes out `"Problem While Organizing Imports...contains ambiguous reference"` – Lisa Anne Oct 25 '13 at 11:25
  • http://stackoverflow.com/questions/979057/any-reason-to-clean-up-unused-imports-in-java-other-than-reducing-clutter – Gajendra Rawat Oct 25 '13 at 11:29
  • http://stackoverflow.com/questions/6799657/eclipse-is-there-a-way-to-force-an-import-in-organize-import-to-solve-an-ambigu please chek them may be you get somthing – Gajendra Rawat Oct 25 '13 at 11:30
1

change the build target version and clean the project, after completing that change that build version to previous.

it works for me.

balaji koduri
  • 1,321
  • 9
  • 25