Android: Version.sdk_int not working
<p>I have the following code:</p>

<pre><code>if(VERSION.SDK_INT &gt; 7) // = Android 2.1 needed
        {
            //do something
        }
        else
        {
            Toast.makeText(MainScreen.this, "You need at least Android 2.1.", Toast.LENGTH_LONG).show();

        }
</code></pre>

<p>If I run my code in debug mode on a HTC device the debugger can evaluate VERSION.SDK_INT and everything works fine. Running the same code on Samsung Galaxy (AT&amp;T) device the debugger only shows (pending), thus it cannot evaluate the VERSION.SDK_INT. I see on the Samsung Device always this Toast message.</p>

<p>The settings of the phone show the following:</p>

<ul>
<li>Firmware Version 2.1-update1, is that the Android version?</li>
<li>Buildnumber ECLAIR, that would be Android 2.0</li>
<li>Kernal 2.6.29</li>
</ul>

<p>So what version am I running on? I assume it is 2.0 and that the firmware is not the value I am looking for. But why can't it evaluate the VERSION.SDK_INT?</p>

<p>Thanks, 
A.</p>
