You have most of it. the --target value that you project to 'android create project' or 'android update project' will define what APIs you compile against. If you want to use APIs from 1.6 you need to update your project with the 1.6 target.
(The new SDK, starting with 1.5, can contains multiple versions of the APIs. So if you install 1.1, 1.5 and 1.6 in your SDK, you could work on different applications using different APIs at the same time. You PATH environment variable only need to point to the tools folder of your single SDK. When a new SDK is realeased the new SDK updater will allow you to add/update your current SDK instead of downloading a new one in a different location.) The content of the <uses-sdk> is used at install time (and allows Market to filter out which apps are seen by which device). you could technically compile against Android 1.6 but declare minSdkVersion=3 (== Android 1.5) but if a 1.5 device tries to execute the new APIs it'll crash. You might want to read http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html for information about how to support older devices while using new APIs. Xav On Mon, Sep 28, 2009 at 2:28 PM, sdphil <[email protected]> wrote: > > okay, so I have 1.5 and 1.6 co-existing on my dev boxes / build > machine. > > I change my manifest to still say: > > <uses-sdk android:minSdkVersion="3" /> > > I'm not sure what happens when I need to use a 1.6 feature. > > The build script still uses > > android .... --target 2 .... > > So that it can support 1.5. > > I guess what I'm doing then is compiling my code which was designed > around 1.5 using the 1.6 SDK. It should theoretically just install on > a 1.5 phone, right? > > Then what happens if i start using 1.6 features? I assume at that > point i need to do something like > > android .... --target 4 .... > > But then what happens when I install on a phone with 1.5... > > tia. > > On Sep 28, 9:55 am, Mike Collins <[email protected]> wrote: >> I have 1.1, 1.5 and 1.6 all peacefully coexisting on my dev boxes. >> Follow the directions. >> >> mike > > > -- Xavier Ducrohet Android SDK Tech Lead Google Inc. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

