Application works on emulator, but not on real device - float type
<p>My application works great while using the emulator, but it crashes while working on real device. I code it for Android 2.2. Real device is 2.3.6.</p>

<p><strong>Problem is here:</strong></p>

<p>When I use something like that:</p>

<pre><code>tvPlayerOneScores.setText("-" + numberFormat.format(level));
</code></pre>

<p>it works great both on emulator and real device.</p>

<p>But when I try this:</p>

<pre><code>tvPlayerOneScores.setText("-" + numberFormat.format(level * 0.5f));
</code></pre>

<p>it works on emulator, but crashes on real device.</p>

<p>Stack Trace:</p>

<pre><code>java.lang.NumberFormatException
    at org.apache.harmony.luni.util.FloatingPointParser.parseFltImpl(Native Method)
    at org.apache.harmony.luni.util.FloatingPointParser.parseFloat(FloatingPointParser.java:321)
    at java.lang.Float.parseFloat(Float.java:323)
    at java.lang.Float.valueOf(Float.java:362)
    at com.amrotek.truthordare.GameActivity$4.onClick(GameActivity.java:287)
    at android.view.View.performClick(View.java:2552)
    at android.view.View$PerformClick.run(View.java:9229)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3701)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
    at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>EDIT:
I multiplied all values by 10, so I only work with integer numbers when I do arithmetic operations. At the end I just divide end value by 10. It works :)</p>
