Pergunta

I notice that while developing an Android application, sometimes when an uncaught Exception is thrown due to a bug in my app, it doesn't force close the app, but simply resets to the main activity.

What circumstances cause this to happen?

Foi útil?

Solução

The exception occurs in a specific activity, which then dies. Focus is then returned to the activity one higher up in you app's activity stack.

If this activity isn't affected by the cause of the exception in the dead activity, it will simply process as normal.

Outras dicas

When there is null pointer exception in the current activity which won't affect the other activities.. Also when few resources not found!!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top