毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> 移动平台 >> 正文

thread main exiting due to uncaught exception

更新时间:2012-5-17:  来源:毕业论文

Android Launch!
[2012-03-13 16:42:29 - Activity_03] adb is running normally.
[2012-03-13 16:42:29 - Activity_03] Performing mars.Activity03.Activity03 activity launch
[2012-03-13 16:42:29 - Activity_03] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'android1.6'
[2012-03-13 16:42:34 - Activity_03] Application already deployed. No need to reinstall.
[2012-03-13 16:42:34 - Activity_03] Starting activity mars.Activity03.Activity03 on device emulator-5554
[2012-03-13 16:42:38 - Activity_03] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=mars.Activity03/.Activity03 }

error:
E/AndroidRuntime(805): Uncaught handler: thread main exiting due to uncaught exception
(这个哪里会有异常??)
03-13 08:50:03.854: E/AndroidRuntime(805): java.lang.RuntimeException: Unable to start activity ComponentInfo{mars.Activity03/mars.Activity03.ResultActivity}: java.lang.NumberFormatException: unable to parse 'null' as integer(我在两个框里输入的都是整数,怎么不能转了?)
 
Activity03.java内容如下:


Java code
package mars.Activity03;
import android.app.Activity;import android.content.Intent;import android.os.Bundle;
import android.view.View;import android.view.View.OnClickListener;
import android.widget.*;

public class Activity03 extends Activity {
  
    private EditText factorOne,factorTwo;
    private TextView symbol;
    private Button calculate;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //根据控件的ID来取得代表控件的对象
        factorOne=(EditText)findViewById(R.id.factorOne);
        factorTwo=(EditText)findViewById(R.id.factorTwo);
        symbol=(TextView)findViewById(R.id.symbol);
        calculate=(Button)findViewById(R.id.calculate);
       // symbol.setText("乘以");
        //calculate.setText("计算");
        symbol.setText(R.string.symbol);
        calculate.setText(R.string.calculate);
        calculate.setOnClickListener(new CalculateListener());
    }
    class CalculateListener implements OnClickListener{

        public void onClick(View arg0) {

[1] [2] 下一页

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。