0

I have a project i used that worked fine, then i replaced a java file(class) with file from some other java project(had extra code in it), and also the strings.xml and some of the layouts. and now this class dont recognise some of the new xml id's, even though i double-checked and everything seemed ok and hit "save" on each of the files. I tried to clean the project and it made the R.java file disappear for good. I checked the answers in:

Developing for Android in Eclipse: R.java not regenerating

But nothing helped me.

The XML files have no errors, and i didnt changed the manifest file. Only replaced a .java file and the layouts. What else can be the problem? It is the second time it happens to me while trying to "import" others files to my project.

Community
  • 1
  • 1
Yevgeni
  • 1,533
  • 17
  • 32

2 Answers2

0

restart, clean and rebuild your application in android studio or java application help. If you are using android studio then, You can also try to sync project files with gradle file.

should be under tools --> android --> sync project files with gradle file in your android studio.

srbyk1990
  • 411
  • 5
  • 17
0

try clean your eclipse using terminal. cd to your eclipse directory. Mine like this

cd /Applications/eclipse_juno/Eclipse.app/Contents/MacOS

then clean

./eclipse -clean

done

Nurdin
  • 23,382
  • 43
  • 130
  • 308