开发者

setting package/path to generated R.java

开发者 https://www.devze.com 2023-04-01 22:23 出处:网络
In the manifest I have: ... package=\"com.domain.app.multimedia\" which then names the application/activity with:

In the manifest I have:

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

which then names the application/activity with:

... activity andr开发者_JAVA百科oid: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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号