I have an app that works fine in Android 1.x but not in Android 2.x i need to do things different based on the version of Android the app is running on (querying contacts).
You can read out the OS version of the device.You can have different methods in your app depending on the device OS version, but you can only compile against one SDK version. Therefore, you need to choose the minimum, which at the moment currently is 1.6 (I think 1.5 is rarely used anymore)
see: http://developer.android.com/reference/android/os/Build.VERSION.html
developing for multiple screens / devices: http://developer.android.com/guide/practices/screens_support.html