I need to brand my application, and only few images need to be customized, the codebase is the same except few generated constants.
As aapt allows to specify many resource directories, is there any way to specify res directories in Eclipse .classpath file? Something like
<classpathentry kind="androidres" path="res/common" />
<classpathentry kind="androidre开发者_如何学Cs" path="res/brand/mybrand_a" />
Or is there any other mean to do that?
Thanks
Have you tried using symlinks from your brand-specific dirs to the main res/
dir?
I have no trouble making aapt use multiple resource directories. The target for building the resources in my ant build.xml contains what is shown below, and the branded resources take precedence over the non-branded ones. I don't see any way to do the equivalent for building with Eclipse, however.
<exec executable="${aapt}" failonerror="true">
<arg value="package" />
<arg value="-m" />
<arg value="-J" />
<arg path="${folder.gen}" />
<arg value="-M" />
<arg path="AndroidManifest.xml" />
<arg value="-I" />
<arg path="${android.jar}" />
<arg value="-A" />
<arg path="${location.assets.branded}" />
<arg value="-S" />
<arg path="${location.res.branded}" />
<arg value="-S" />
<arg path="${location.resource}" />
</exec>
精彩评论