Thank you for clarifying those points, Dianne.

On 28 January 2011 00:42, Dianne Hackborn <[email protected]> wrote:

> This isn't really a problem; it is working as intended.  You are using
> something from a newer platform that doesn't exist on an older platform.
>  What do you expect to happen when you run on the older platform?
>

Well, I've learnt not to expect anything :) But I most hope for a meaningful
error message, failing that an error message that is not misleading (like
claiming a particular resource is missing when it is not).

The older platform never knew what this thing was.  It turns out that there
> are a lot of drawables in the platform that aren't in the SDK, so you are
> using a larger resource number than what was publicly defined in the older
> platform, ending up with (pretty randomly) one of its private drawables.
>

I think I follow, though maybe not. Would it not be possible for the
compiler to throw up some warning about this? i.e. if there is some resource
referred to which is not publicly defined in at least one of the SDK levels
not less than that specified in minSdkVersion?

If you are using new APIs and trying to run on an older platform, you just
> need to make sure that you don't try to use them when on the older platform.
>  This applies to Java APIs as well as resources.
>

There are a couple of concerns here:

1. How to debug this? I'm not aware I'm using any "private"/"internal"
resources or any public resources introduced after SDK level 4 (which I set
the minSdkVersion to)
2. How to safeguard against this?

I've tested my app in the emulator at SDK level 4,7,8 & 9. Everything worked
fine. I haven't tested it at level 5 or 6 because they don't seem to be
available in the AVD Manager but anyway I would think it unlikely that a
resource would be defined in levels 4&7 but not 5.

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