setting package/path to generated R.java

喜欢而已 提交于 2020-01-05 07:44:29

问题


In the manifest I have:

... package="com.domain.app.multimedia"

which then names the application/activity with:

... activity android:name=".MultiMedia"

Eclipse, in turn, generates R.java in the package/path:

... com.domain.app

This package/path name may be a legacy of prior package renamings/refactoring - don't know.

I presumed (a mistake, or not) that R.java generation would follow the package name declared in the manifest. It would be a treat to find out how the gen chose the path/package name it uses. And more to the point, what is the rule for the manifest package name (other than the standard precaution of uniqueness, and relating to an owned domain).

Otherwise, I can live with this (an easy solution where forcing what appears to be an arbitrary import statement solves it all as far as getting a runtime).

Cheers, Richard


回答1:


Generally speaking, when you change the package name in your AndroidManifest.xml file, you are prompted with a question if you'd like to change the configuration to reflect the new package. If you haven't clicked yes, you can always right click on the project -> Android Tools -> Rename application package



来源:https://stackoverflow.com/questions/7290068/setting-package-path-to-generated-r-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!