Dianne, Is there a way to prevent aapt v2.2 from "automatically including the appropriate minimum version for new configurations, so that older platforms do not see them"?
Due to this sneaky aapt behavior we simply cannot use 2.2 SDK as we either will loose 1.5 support or increase our APK size by 40%. All image resources in our game are placed in "drawable-hdpi" folder. Such structure gives us the minimum APK size with the highest quality of images. This worked very well until 2.2. SDK. Although Android 1.5 does not "know" about "hdpi" postfix it nevertheless magically knows that it needs to scale the images down by factor of 1.5 (from hdpi to mdpi). If there is no way to prevent aapt v2.2 from messing around with resources can you please suggest any workaround? -Kiryl. On Jun 9, 3:57 pm, Dianne Hackborn <[email protected]> wrote: > On Mon, May 24, 2010 at 12:52 PM, Mark Murphy <[email protected]>wrote: > > > Xavier Ducrohet wrote: > > > The short of it: 1.5 does not know about -mdpi -hpdi, so it'll take > > > the first one it finds which could be the wrong one (which means it'll > > > get scaled). > > FWIW, the solution given in that presentation was to have both -mdpi and > > -mdpi-v3, with duplicate resources. -mdpi-v3 would be picked up by > > Android 1.5; -mdpi would be picked up by newer versions of Android that > > are legitimately running mdpi displays. > > Um, no, you should use -hdpi-v4 so that v3 of the platform does not see the > hdpi resource (which it does not understand) as a possibility. > > Also as of 2.2 aapt will automatically include the appropriate minimum > version for new configurations, so that older platforms do not see them. > Though I notice that it uses -v4 for a resource that has ANY density > specified, so if you don't have default resources for images you may break > on 1.5. That is, you'd want drawable/, drawable-hdpi/, etc; and aapt will > turn this in to drawable/ and drawable-hdpi-v4/ for you. If you have > drawable-mdpi/ and drawable-hdpi/ you will end up with drawable-mdpi-v4/ and > drawable-hdpi-v4, neither of which v3 (1.5) can accept. > > I should probably leave -mdpi as not having a version config... I think 1.5 > can still handle those, though I'll have to check. > > (Note aapt also adds -v4 for -normal, -large, -small, -long, and -notlong; > and -v8 for -car, -desk, -night, and -notnight.) > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

