hello everyone,

I just commented on the bug but I'll copy-paste it here too.

Short version: this is working as intended (and has it should always have been).

What is happening is that some styles, like WindowTitle are not public
(you won't find them in android.R.style). You should not be extending
non public resources. aapt used to let you do that but it was a bug
which was fixed in platform-tools r6.

The issue is that once compiled, resources are assigned an integer. In
this case your custom style is assigned an integer and its parent is
referenced through the parent integer.

For the framework, only public resources are guaranteed to only have
the same integer, build after build. The integer of private resources
integer will change from build to build.

This means that your custom style is referencing a parent that *will
not* be valid once installed on a device. It'll referenced either
another resources or none at all, and it won't do what you want.

If you wish to reuse a style that is private, you should copy the
content of that style into your own instead of extending it.

Reverting to an older aapt that lets you do this is basically similar
to using a private Java API.

Our stance on this has been clear since 1.0: Don't do it. It may be
convenient for a bit, but it'll break on devices, all of them in this
case too, and it's not good for anyone.


xav
-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

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

Reply via email to