On Sat, Apr 16, 2011 at 3:08 AM, String <[email protected]> wrote:
> Yes. That's the difference between min-sdk-version and the level specified in 
> Properties, and is how it's always been if you're supporting a range of 
> versions.

Agreed.

Your build target (default.properties for Ant, Project > Properties >
Android for Eclipse) is a compile-time construct. It determines what
version of the SDK you are compiling against. This needs to be at
least as high as the highest API-level feature you are referencing in
code or XML. In this case, you'd build against 11.

minSdkVersion is a runtime construct, used to filter you out of the
Market and such for devices that you do not support. An API Level 4
minSdkVersion can handle an API Level 11-built app just fine... if the
app is carefully constructed. XML attributes that are not recognized
by API Level 4 will be ignored, but Java code referring to API Level
11 features (or 10 or 9 or 8 or...) will need to be isolated and only
loaded into the VM on compatible devices. That's the reason for the
HoneycombHelper class -- ActionBarBC wants to work with a View loaded
right into the action bar, but the method to do so only exists on API
Level 11. HoneycombHelper is only referenced on an API Level 11
device, courtesy of a Build.VERSION.SDK_INT check.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

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