[英]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.