Answers
Allen Luce 2019-04-24T23:32:16
The \"process is bad\" is due to multiple crashes of the app (or BroadcastReceiver, Service, or other component). After a few of these the system decides it's fed up with that behavior and prevents the process from starting again.\n\nA reboot will clear the crash count but it can also be cleared by killing the system server:\n\nadb shell killall system_server\n\n\nThis will effectively do a \"soft reboot.\" I find it much quicker than an actual reboot.",
Record413123 2011-10-25T12:05:09
i got mine fixed like this:\n\nuninstall the application and install it again.\n\ni got this error when i installed a \"test\" application with the same package name and messed up something in the app cache data or somewhere.",
diptia 2012-03-13T11:13:33
I faced a similar problem . When I went through my code , I realized that it was the default values which were the culprit . Ensure that your default values are logical and positive.For instance ,if you have a background service starting at a particular interval , ensure that the default value you have set for the same is appropriate. ",
bbengfort 2012-04-19T13:36:06
The problem for me was also had to do with the XML- specifically I had a TextView element that did not specify layout_width and layout_height because they were inheriting a style that did not contain them. My styles.xml file was not validated for this by eclipse. When I ran the app I got the error that these views must be specified- when I fixed the error, I received the process is bad error, and had to Force Quit. \n\nUnfortunately I think that some settings were maintained, so rebuilding the app was not enough after the fix. I had to uninstall the app-- reboot the phone (to eliminate som persistent data) and when I reinstalled I recovered from the error.",
Victor Basso 2014-01-21T18:56:17
Happened to me when my BroadcastReceiver was repeatedly leaking an exception causing the system to kill my app.\nThe next calls to the receiver would result in the \"process is bad\" logs.\n\nThe solution in my case was making sure no exceptions leak from the BroadcastReceiver.\n\nThose are the logs when the app is killed (try looking for them and finding the cause):\n\nW/ActivityManager﹕ Process com.company.app has crashed too many times: killing!\nI/ActivityManager﹕ Killing proc 9344:com.company.app/u0a10239: crash\n",
abeboparebop 2015-05-18T05:26:37
Somewhat off-topic, but in some Android devices one can reproducibly cause this failure by writing an app which creates an UncaughtExceptionHandler in onCreate to restart the app after a crash, and then does something to cause an unhandled exception (either throw a RuntimeException, or do something that causes an NullPointerException, or whatever). Some example code is given below.\n\nI have tried this on two devices: a Samsung Galaxy Tab 2, and a Verizon Ellipsis 7. With the Tab 2, I couldn't cause the issue while I was running the app from Eclipse -- it would crash and restart repeatedly and never be killed. Instead, I had to export the app to apk, install via adb, start the app, and after 4-8 crashes and restarts, Android would kill the app with the error message above (Process com.buggy.app has crashed too many times: killing!).\n\nWith the Ellipsis 7, I was never able to reproduce the issue. The buggy app would repeatedly crash and restart, and the OS never killed it even after 10 minutes of this.\n\nSample code for repeatedly crashing app:\n\npublic void onCreate(Bundle savedInstanceState) {\n mContext = this.getApplicationContext();\n\n UncaughtExceptionHandler uehandler = new Thread.UncaughtExceptionHandler() {\n\n @Override\n public void uncaughtException(Thread thread, Throwable ex) {\n\n // restart app after 100 milliseconds\n PendingIntent myActivity = PendingIntent.getActivity(mContext, 0,\n new Intent(mContext, MyActivity.class),\n PendingIntent.FLAG_ONE_SHOT);\n AlarmManager alarmManager = (AlarmManager) \n mContext.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC, System.currentTimeMillis() + 100,\n myActivity);\n\n System.exit(2);\n\n // re-throw critical exception further to the os (important)\n Thread.getDefaultUncaughtExceptionHandler().uncaughtException(thread, ex);\n }\n };\n Thread.setDefaultUncaughtExceptionHandler(uehandler);\n\n throw new RuntimeException(\"Crash the app!\");\n}\n",
mobibob 2010-10-09T03:33:47
I am having the same problem and my current theory is that the appWidget crashed and when it was restarted it had the same bad persistent data that made it crash each time it was restarted. When this happens too often, the appWidget is \"force stopped\" by the OS. My band aid is to have a touch event that is \"setOnClickPending\" that the user will touch (out of frustration if necessary) and that will be processed internal to the appWidget and reset the appWidget.",
Mitulát báti 2015-06-26T14:23:23
I had the same problem. I got to a point where restarting and reinstalling the application didn't solve the problem. I was frustrated. I removed everything from the class that extended AppWidgetProvider, and run the application with only two empty methods in it: onUpdate and onReceive. Finally solved the problem.\n\nMaybe it will not solve yours, but who knows. Give it a try.",
NPike 2010-07-20T02:31:37
I just experienced this myself right before packaging for the market place. I was following the guidelines and added the android:label=\"@string/app_name\" attribute to the application element in my manifest...\n\n\nUninstall your app\nReboot phone/emulator\nPush new app without this attribute\n\n\nViola! Works for me now! \n\nEDIT: To match comments.",
sorry_I_wont 2019-09-09T21:03:01
This worked for me!\nChange your implicit intent to explicit intent, because starting Oreo implicit intents don't run in background!\nSo basically when creating your Intent object, pass in the class name you want to start.\nhttps://developer.android.com/about/versions/oreo/background.html",
Dan J 2012-02-16T22:28:56
I hit a process is bad error on my HTC Sensation OS 2.3.4 after removing the INTERNET permission from my AndroidManifest.xml.\n\n\n W/ActivityManager( 253): Unable to launch app\n MY_DOMAIN.flashback/10132 for broadcast Intent {\n act=android.intent.action.PHONE_STATE flg=0x20000000 (has extras) }:\n process is bad\n\n\nI carefully tried lots of different workarounds, and I found the only way to fix was:\n\n\nUninstall the app through Settings -> Applications.\nRemove the battery from the phone (using the Android \"Power off\" menu did not work).\nTurn device on again.\nInstall the APK again using adb install <myapp>.\n\n\nI want to take this opportunity to list what did NOT work for me (as there seems to a lot of FUD about how to fix this error):\n\n\nUninstall app, reboot using Android phone menu (press and hold on button and choose \"Power off\"), turn on again, reinstall.\nUninstall, use adb kill-server, then adb start-server, reinstall.\nUninstall, run adb shell then ps, this didn't show my app running at all.\nUninstall, do a clean build in Eclipse, reinstall.\n\n\nI wonder if the underlying problem was caused by my app getting smaller in size. I think it used to unpack to flashback-1.apk and flashback-2.apk on the device, whereas now it is only unpacking to a single flashback-1.apk.",
tsinyun 2012-09-02T14:40:03
I just get this error. \nI fix the error and I remove some source code invoking from OnConnectionReceiver.onReceiver(), Maybe the invocation will cost some time.",
Jacob L 2012-10-05T13:34:23
I faced this problem. the reason was that the WLAN call wifi.getConnectionInfo().getScanResults(); could return a null instead of an empty list in some occations. I found this after logging the logcat for several hours. When the application encountered an error and crashed, a touch on the widget would give me the same \"bad process\" error you mention here as the intent did not reopen the app, but it gets stuck in a crashed state. Guess it it just the way Android deals with a crashed widget.",