new Thread(){ @Override public void run() { Looper.prepare(); if (getInfo()){ Intent intent = new Intent(); intent.setClass(MainActivity.this, DetailActivity.class); startActivity(intent); }else{ Toast.makeText(MainActivity.this, "用户名或密码错误", Toast.LENGTH_SHORT).show(); } Looper.loop(); } }.start();
Android java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.pr
最新推荐文章于 2021-12-08 15:02:27 发布