Android 活动启动时出现Nullpointer异常

Android 活动启动时出现Nullpointer异常,android,nullpointerexception,bin,dex,Android,Nullpointerexception,Bin,Dex,我以前在完美运行的应用程序中有一个错误。这里显示的快照是在我清理项目之后出现的。据我所知,android代码完全正确 package com.tmresponseportal; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.v

我以前在完美运行的应用程序中有一个错误。这里显示的快照是在我清理项目之后出现的。据我所知,android代码完全正确

   package com.tmresponseportal;

 import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
 import android.view.View;
 import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class Client1 extends Activity {
TextView text1,tvforpass;
EditText tbid,tbpwd;
Button bsubmit,bclose;
Emailval el = new Emailval();


public void Intentstr() {
    // TODO Auto-generated method stub
    Intent i1 = new Intent();
    i1.setClass(Client1.this,Clwelcome2.class);
    startActivity(i1);

}

public void Intent_start2() {
    // TODO Auto-generated method stub
    Intent i2 = new Intent();
    i2.setClass(Client1.this,Forpass.class);
    startActivity(i2);
}

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_client1);


    text1 = (TextView)findViewById(R.id.text1);
    text1.setSelected(true);
    tbid = (EditText)findViewById(R.id.tbid);
    tbpwd = (EditText)findViewById(R.id.tbpwd);
    bsubmit = (Button)findViewById(R.id.bsubmit);
    bclose = (Button)findViewById(R.id.bclose);
    tvforpass = (TextView)findViewById(R.id.tvforpass);


    tvforpass.setOnClickListener(new OnClickListener() {





    bclose.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View arg0) {
            // TODO Auto-generated method stub

             finish();
                System.exit(0);
        }
    });
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_client1, menu);
    return true;
}
}

当我尝试运行或调试应用程序时,应用程序强制关闭。它甚至不会发射!!logcat显示空指针异常

我认为这个错误与bin>dexedlib或构建路径有关

有人知道吗。 非常感谢您的任何想法

提前谢谢


您的项目有一些库错误


转到属性,然后修复java构建路径,检查是否正在使用任何库项目,它应该与主项目位于同一位置,检查是否缺少库。修复项目属性并再次清理。

好吧,我自己在回答我的愚蠢问题
库注释-3e4e92ba3f3a5427576379deacae2306-E9D0B35CDF8DC6A314B668EFA542277B9.jar 不知怎的被删除了

我把它复原了,它工作了

要检索, 右键单击项目>恢复本地历史>和我想要的库


完成:)

检查“问题”选项卡以查看错误。是否可以发布日志?转到->显示视图->问题,检查问题所在…错误选项卡显示文件39ce…bin中缺少某些内容不允许使用项目生成选项!!:(请尝试检查“窗口-->显示视图-->问题”选项卡。在项目中添加libs文件夹并在其中添加所有外部库,检查是否有同一库的多个副本……这主要是与库位置有关的dex错误。)。