Small project in Android
<pre><code>Double temp_val = 0.0;
temp_val = Double.parseDouble(et1.getText().toString());
if (temp_val &lt; 14) {
  final AlertDialog alertDialog = new AlertDialog.Builder(this).create();
  alertDialog.setTitle("Reset...");
  alertDialog.setMessage("WB should be greater than or equal to 14");
  alertDialog.setButton2("OK", new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
      // here you can add functions
      dialog.dismiss();
    }
  });
  alertDialog.setIcon(R.drawable.icon);
  alertDialog.show();
  et1.setText("");
  tv1.setText("WB");
  return;
}
double p = 1.8;
double fvalue = p;
temp_val = temp_val * fvalue;
temp_val = (temp_val + 32);

String temp_val1 = Double.toString(temp_val);
wbval = Integer.parseInt(temp_val1);
</code></pre>

<p>and I got the following Exception, please give me solution</p>

<pre><code>07-31 14:27:35.558: ERROR/AndroidRuntime(375): FATAL EXCEPTION: main
07-31 14:27:35.558: ERROR/AndroidRuntime(375): java.lang.NumberFormatException: unable to parse '' as integer
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at java.lang.Integer.parseInt(Integer.java:412)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at java.lang.Integer.parseInt(Integer.java:382)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at com.ExtraCharge.Calc.onClick(Calc.java:744)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at android.view.View.performClick(View.java:2408)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at android.view.View$PerformClick.run(View.java:8816)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at android.os.Handler.handleCallback(Handler.java:587)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at android.os.Handler.dispatchMessage(Handler.java:92)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at android.os.Looper.loop(Looper.java:123)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at android.app.ActivityThread.main(ActivityThread.java:4627)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at java.lang.reflect.Method.invokeNative(Native Method)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at java.lang.reflect.Method.invoke(Method.java:521)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-31 14:27:35.558: ERROR/AndroidRuntime(375):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>
