我想转换EditText
为浮动。我这样做:
EditText edt = (EditText) findViewById(R.id.price);
float number = Float.valueOf(edt.getText().toString());
该应用程序也没有加载到我的设备和模拟器中。在他们两个写:
"the application has stopped unexpectedly. please try again."
如果我删除这一行:
float number = Float.valueOf(edt.getText().toString());
该应用程序可以加载。
我能做什么?