0

I changed the package name in my manifest file. It automatically changed the target package for the generated files.

Now Eclipse doesn't create the R file.

What could be the problem?

EDIT: I am wondering if this could hacve anything to do with the fact that there also a library project invovled. Originally this project and the library project shared the same package name. In that case everything worked perfectly. Now that I changed the package name in the non-library project it stops working and no R file is built.

Edit 2: BLAH.

Finally discovered what the problem was. It was my custom elements in the library that were causing the problems. Up to now the package name of the application in the library and the one in the application were the same so it had no problem. Once I changed the one in the application it could no longer recognise the namespaces. I now have to replace them all with res-auto: Help with a custom View attributes inside a Android Library Project

The most annoying thing si that when you build a new layout inside a library it will tell you that you must use res-auto. However, when you convert a previously existing application into a library it doesn't.

I now have A LOT of work ahead of me.

Community
  • 1
  • 1
theblitz
  • 6,683
  • 16
  • 60
  • 114
  • delete R.java and build project again – Sam Jun 06 '13 at 09:50
  • could it be that you got an error in you xml files? – Boe-Dev Jun 06 '13 at 09:50
  • Change the package name by using refractors rather using F2. Delete the existing R file. Clean and build the project . Check you manifest file also whether pkg name is renamed or not. – Rahul Patil Jun 06 '13 at 09:50
  • There is no R.java file for me to delete and there is definitely no error in the XML files. – theblitz Jun 06 '13 at 11:21
  • Does the other library project build? From what you're saying it appears that you have a cyclic reference between projects. Project A depends on that Library and that Library depends on Project A? Just Clean the project (Project->Clean) and check the error log window. When I had problems with the R file in the past it also happened that Eclipse was automatically adding the R file as an import in all the classes that used it. – Gonan Jun 06 '13 at 13:07
  • There is definitely no cyclic reference. My problem is that the R file is just disappearing. It deletes the old package under "gen" and creates the new one. Howevre, it does not include an R file. – theblitz Jun 06 '13 at 13:12

0 Answers0