On Wednesday, May 22, 2013 at 08:24 EDT,
android...@gmail.com wrote:
> I've just encountered a strange behaviour in AOSP compilation toolchain.
> When I compile my app as part of the AOSP (in packages/apps/ ), and then
> open the emulator and run it, it always takes resources out of the mdpi
> folder even though I compiled the emulator with a 320 screen density
> (hw.lcd.density = 320).
> However, if I compile the same app with eclipse and install it on that
> same emulator, resources are taken from xhdpi as they should.
> What could be causing this?
When you build with Eclipse all resources are included because the
APK is device-agnostic, but when you build it with make it's device
specific and only includes resources for the target product. Previously
this was done by adding e.g. xhdpi to PRODUCT_LOCALES of a suitable
product config file (perhaps build/target/product/
full_base.mk or
generic.mk would be suitable in this case), but nowadays it seems
PRODUCT_AAPT_CONFIG is the correct place. See example in
build/target/product/
mini.mk.
--
Magnus Bäck
ba...@google.com