the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > flash back problems there are many possible reasons, and the information provided by you is too little, I'm not too sure what causes. However, I can offer you some common solutions that I hope will help you.
1. Check the log
You can try looking at the log in Android Studio to see if you can find anything useful. You can view logs in Android Studio by entering the following command in the terminal, connecting the device to the computer, and running your application.
adb logcat -s YOUR_APP_PACKAGE_NAME
2. Check permissions
If your application requires permissions to function properly, then you need to check that your application has applied for these permissions. You can add the following code to the AndroidManifest.xml file:
name="android.permission.YOUR_PERMISSION_NAME" />
3. Check whether the application is killed.
Sometimes the application is killed by the system for various reasons, which causes the application to crash. You can check to see if the application is killed by adding the following code to your Activity's onCreate() method:
if (savedInstanceState == null) {
//应用被杀死,重新启动应用
} else {
//正常启动应用
}
4. Confirm if your code has a problem
You can try to comment out some of the code, step by step to troubleshoot the problem, and find the code that is causing the flash back. There may be a problem with your code logic that causes the application to crash.
Hopefully these methods will help you find the problem.