There are two basic ways:
- write to the earliest version of the OS you want to support
- use conditional compilation to build a binary for each version of the OS you wish to specifically support
At the moment my major projects are compiled for 4.2, 4.5, 4.6.1, 5.0 and 6.0 using conditional compilation.
If you stick with the provided UI toolkit adapting to different resolutions is, for the most part, taken care of for you. This won't look exactly the same on all devices, but the app will match the OS that the user sees, which is probably what you really want.