---
title: "Unfortunately my app has stop"  
description: "Unfortunately my app has stop"  
author: "nhel clamor"  
published: 2015-06-19  
updated: 2015-06-22  
canonical: https://www.mindstick.com/forum/23308/unfortunately-my-app-has-stop  
category: "android"  
tags: ["android"]  
reading_time: 2 minutes  

---

# Unfortunately my app has stop

guys, please help me with this, I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to create an [email](https://www.mindstick.com/articles/12870/10-easy-ways-to-manage-your-business-email-inbox) app without [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) [interaction](https://yourviews.mindstick.com/view/80771/technology-is-destroying-human-interaction-how), I copied this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) and follow everything they [say](https://answers.mindstick.com/qa/116645/a1-wreckers-reviews-what-do-customers-say), but my app always unfortunately stop.\
\

```
06-19 05:59:03.072: E/AndroidRuntime(5479): FATAL EXCEPTION: AsyncTask #206-19 05:59:03.072: E/AndroidRuntime(5479): Process: com.example.disapp, PID: 547906-19 05:59:03.072: E/AndroidRuntime(5479): java.lang.RuntimeException: An error occured while executing doInBackground()06-19 05:59:03.072: E/AndroidRuntime(5479): 	at android.os.AsyncTask$3.done(AsyncTask.java:300)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at java.util.concurrent.FutureTask.setException(FutureTask.java:222)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at java.util.concurrent.FutureTask.run(FutureTask.java:242)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at java.lang.Thread.run(Thread.java:841)06-19 05:59:03.072: E/AndroidRuntime(5479): Caused by: java.lang.NoClassDefFoundError: javax.activation.DataHandler06-19 05:59:03.072: E/AndroidRuntime(5479): 	at com.example.disapp.GMailSender.sendMail(GMailSender.java:59)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at com.example.disapp.Home$MyAsyncClass.doInBackground(Home.java:416)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at com.example.disapp.Home$MyAsyncClass.doInBackground(Home.java:1)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at android.os.AsyncTask$2.call(AsyncTask.java:288)06-19 05:59:03.072: E/AndroidRuntime(5479): 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)06-19 05:59:03.072: E/AndroidRuntime(5479): 	... 4 more06-19 05:59:03.092: W/ActivityManager(373):   Force finishing activity com.example.disapp/.Home
```

\

## Replies

### Reply by Manoj Pandey

If you copied code from this link then you have need to some changes in your code and i have already changed my code you can see.

Remove toast from Void doInBackground(Void... mApi)

You cannot show toast on doInBackground() method here

because there is dialog already running, you have need to remove toast from here and add on onPostExecute( ).

```
  @Override		protected void onPostExecute(Void result) {			super.onPostExecute(result);			pDialog.cancel();			Toast.makeText(MainActivity.this, "Email send", Toast.LENGTH_LONG)					.show();		}
```

\


---

Original Source: https://www.mindstick.com/forum/23308/unfortunately-my-app-has-stop

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
