What are the possible reasons for NoClassDefFoundError when querying Environment?
<p>This is the offending line of code:</p>

<p><code>String state = Environment.getExternalStorageState();</code></p>

<p>Why does it throw NoClassDefFoundError in some rare cases (never on my development device, but on some users' devices)?</p>

<p>The target systems are Android 3.1 and higher, I don't know which system it crashed on.
The exact message I get from bugreport is: <code>java.lang.NoClassDefFoundError: android.os.Environment</code>.</p>
