We have our application with declared package name as com.foo.app in AndroidManifest.xml
For some special reason to play some trick, we want to intentionally specify the package name of the generated R.java with package name com.bar.resource. And without change the application package name (still kept as com.foo.app).
For example, I have my application using com.foo.app, I want the generated R.java's package name to be com.bar.resource. And in the source code of my application, I will use reference like com.bar.resource.id.btn_ok
We know that we should not touch the content of R.java. And of course we can manually change it and build the final application since it is just a static class with constants.
But is there any configurable option in ADT/Eclipse to do this for an Android project?
Please stop telling me how to change the package name via Eclipse refactor method. Please correctly understand my question. I am asking how to specify a package name of autogenerated R.java. Which I want it to be different from the application package name specified in AndroidManifest.xml.