Application keeps stopping

i have written the code ,have no error,runs successfully and then stops running.I was having this problem earlier also then i created new application with same code and it worked.kindly guide me

You need to check the logcat of the app while it is running to resolve the issue.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.