[英]Why doesn't the finish() method work on my android studio project? 1
[英]Android studio application doesn't close on finish()
您可以使用
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startMain.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startMain.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
尝试添加
System.exit(0);
在finish()之后;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.