问题
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