Reason for process stopped unexpectedly? What is the reason for the process stopped unexpectedly error?

Is it based on that particular android app or the android os or a particular android device?

Example:


I installed smash hit on my Xperia U and I transferred the apk to a
moto g. It was working fine in moto g. But after sometimes it
started to showing process stopped unexpectedly. After sometime it
will start working fine.
Whenever I flash a mod example for camera initially it will show process stopped unexpectedly but clearing the data helps.
I also read somewhere that if you uninstall and install the app again it will start to work.


So what is the cause for this problem
There's no simple answer to the question, "Why do programs crash sometimes?" The error message you see tells you that an app has crashed, just like when a program crashes on a desktop computer.

Usually this indicates a bug (programming error) in the app or in one of the libraries included in the app (e.g. an ad network, or a library for accessing a particular web service). The bug might always happen when you try to do a particular action, or it might be caused by being in a particular state. For example, a calendar app might have a bug that only happens when you create an event on the first of the month, in a month that already contains an event. If the bug is triggered by particular circumstances, clearing the data or cache for that app might make the bug go away until the same circumstance arise again.

Sometimes, the app itself might be correct but the crash caused by a programming error in Android itself. The app might be relying on Android to behave in a particular way, and if Android does the wrong thing, that could later cause the app to crash. Similarly, the crash might be caused by hardware problems: if the phone overheats, the hardware might compute the wrong answers sometimes.

In the first instance, you should report a crash to the developer of the app that crashes. Android's crash-report process will automatically include relevant information with the report, to help the developer see what's wrong. Even if the problem turns out not to be their fault, they will know the right place to report it, and might be able to suggest a workaround you can use to avoid the problem. If you don't report a crash, it probably won't get fixed.