android compatibility. I am confused when using Build.VERSION_CODES
<pre><code>Log.d(TAG, "Build.VERSION_CODES.ICE_CREAM_SANDWICH: " + Build.VERSION_CODES.ICE_CREAM_SANDWICH);
</code></pre>

<p>I write code like this, I used the sdk4.0 to compile this android program, so it didn't cause compile error. When I run this program in my phone that running android 2.3.4, it run well.</p>

<p>Why? I am confused that version 2.3.4(api level 10) has Build.VERSION_CODES.ICE_CREAM_SANDWICH propery? And when I used sdk2.3.4 will cause compile error.</p>

<p>More</p>

<p>I test some code like these below,</p>

<pre><code>private ScaleGestureDetector mScaleGestureDetector;
if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.ECLAIR_MR1) {
    mScaleGestureDetector = new ScaleGestureDetector(this, new MyOnScaleGestureListener());
}
</code></pre>

<p>this code will run well on android 1.6 api level 4, but</p>

<pre><code>if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.ECLAIR_MR1) {
    Log.d(TAG, "getx(0): " + event.getX(0));
}
</code></pre>

<p>this program run failed on android 1.6 api level 4.</p>

<p>They both run on android 2.3.4 well.</p>

<p>why? (In ScaleGestureDetector class use the "event.getX(0)"(since api level 5) too)</p>

<p>I test some code more..</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Fragment f = new Fragment();

}
</code></pre>

<p>When I run it on android 1.6 emulator it throw java.lang.VerifyError, but on my phone running android 2.3.4 it throws java.lang.NoClassDefFoundError.</p>

<p>Why??</p>
