How android OS version compatibility works?
<p>If I use the following code in my app together with Android 2.1 library my app won't compile because GINGERBREAD variable is not visible.</p>

<pre><code>public static boolean SUPPORTS_GINGERBREAD = android.os.Build.VERSION.SDK_INT &gt;= android.os.Build.VERSION_CODES.GINGERBREAD;
</code></pre>

<p>On the other hand if use 2.3 library instead of 2.1 my app is compiled and successfuly run on 2.1 device.</p>

<p>Why is there no exception if I launch 2.3 compiled build on 2.1 device?</p>

<p>For example if I run the same program on 1.5 device there is a crash because Android can not find SDK_INT constant which was introduced only in 1.6. Note that there is no such crash for GINGERBREAD constant which was introduced in Android 2.3</p>

<p>Thanks!</p>
