This popup shows only when you get a fatal exception in your code which stops the execution of the app. It could be any exception NullPointerException
, OutOfMemoryException
etc.
Best way to check is through Logcat if you are still developing the app in Android studio which is quick way to read stack trace and check the cause of the app.
If your app is already live, then you can not use logcat. So, for that you can implement Crashlytics
to provide you bug reports of any exception that occurs.