Just an addition to the solved answer:
This COULD be a problem with Android Studio's Instant Run feature, for example, if you realized you forgot to add the line of code: finish()
to your activity after opening another one, and you already re-opened the activity you shouldn't have reopened (which the finish()
solved), then you add finish()
and Instant Run occurs, then the app will crash since the logic has been broken.
TL:DR;
This is not necessarily a code problem, just an Instant Run problem