安卓点击按钮不能实现跳转 模拟器运行软件点按钮就闪退

点登录按钮就闪退图片说明
下面是代码
```package com.example.test;

import android.app.Activity;
import com.example.test.R;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Denglu extends Activity {
Button denglu,zhuche;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.denglu);
denglu=(Button)findViewById(R.id.denglu);
zhuche=(Button)findViewById(R.id.zhuche);
denglu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

            Intent intent=new Intent(Denglu.this,RegisterActivity.class);
            startActivity(intent);
        }
    });
 zhuche.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //为了跳转到注册界面,并实现注册功能
            Intent intent=new Intent(Denglu.this,LostFindActivity.class);
            startActivity(intent);
            finish();
        }
    });

}

}

第二个
package com.example.test;

import android.app.Activity;
import com.example.test.R;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;


public class LostFindActivity extends Activity {
    Button register;
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.zc);
        register =(Button)findViewById(R.id.register);
        register.setOnClickListener(new  View.OnClickListener() {

            @Override
            public void onClick(View v) {
                 Intent intent = new Intent(LostFindActivity.this,RegisterActivity.class);
                 startActivity(intent);
                 Toast.makeText(LostFindActivity.this, "注册成功,跳转中", Toast.LENGTH_LONG).show();
                finish();
            }
        });
    }

    }
    第三个
    package com.example.test;



import com.example.test.MainActivity;
import com.example.test.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class RegisterActivity extends Activity {

Button denglu;
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub


    super.onCreate(savedInstanceState);
    setContentView(R.layout.dl);
    denglu=(Button)findViewById(R.id.denglu);
    denglu.setOnClickListener(new  View.OnClickListener() {
    @Override
    public void onClick(View v) {
         Intent intent = new Intent(RegisterActivity.this,MainActivity.class);
         startActivity(intent);
         Toast.makeText(RegisterActivity.this, "登录成功,跳转中", Toast.LENGTH_LONG).show();
         finish();
    }
});
}
}
    跳转不了
        思路是先注册然后登陆 进主界面
        下面是报错信息
        ![图片说明](https://img-ask.csdn.net/upload/201906/28/1561724541_821567.jpg)

        萌新一个 求各位大佬帮帮忙

3个回答

先确定Manifest中有没有注册LostFindActivity ,RegisterActivity
然后贴出报错Log

报错信息帖出来,图片看不到

日志!日志!日志!
博客里有:https://blog.csdn.net/weimingjue/article/details/87921494

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问