tags:

views:

312

answers:

2

I'm interested in learning Android development.... but if I install the latest 2.0 SDK, will I still be able to target 1.5 and 1.6 devices? (since there is only one 2.0 device right now) Basically I'm wondering if it will tell me if I'm doing something that won't work on older versions of the OS

+1  A: 

You should always target the minimum API that you require as noted on the Android Development site Hello World tutorial

"If an application requires an API Level that is higher than the level supported by the device, then the application will not be installed."

"Android applications are forward-compatible, so an application built against the 1.1 platform library will run normally on the 1.5 platform. The reverse is not true."

Robert Williams
+2  A: 

Yes you will be able to pick level that you need using combination of Manifest setting and (when in Eclipse) picking Android API version that you need. With 2.0 install you may not get 1.0 or 1.1 but legacy distros available from Google and you can always set your environment to use that

And if you accidentally set your environment to something that device that not support you should always test on the device and watch for exceptions such as ClassNotFoundException and NoSuchMethodException which would indicate that you are attempting to use classes/methods that are not present in the API loaded by your device

DroidIn.net