On Tue, Apr 20, 2010 at 10:04 PM, Christopher <
[email protected]> wrote:

> So assuming for a minute we go with Mark's solution and the abstract class;
>  what target Android version should appear under the project's Properties ->
> Android tab?  The latest API the app uses?
>

Yup.


> This is running on my emulator with Android 1.5, but will it work on an
> actual device?
>

An actual device with 1.5? Supposedly it should, but you always test that on
a device to make sure, if you can.


> If the manifest file is defining what API level the app needed, what's the
> purpose of this Build Target?
>

The manifest defines 1) the minimum API you support (minSDK) so the app
shows up on the correct phones and 2) the one you're primarily developing
for (targetSDK) so the runtime can enable / disable compatibility features,
as far as I understand it.

The Build Target is the platform you're actually building against, which
will determine which functions you can actually use in code at compile time.
So if your build target is 1.5 and you try to use a class or function
introduced later, your project won't even build. Conversely, if you use the
latest build target and use a class or function introduced after 1.5, it
will build fine, but if you run it on a 1.5 device without the proper
runtime checks, it will die a horrible death.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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