I have an issue that I cannot find a solution for. I am developing two different Android apps that are a part of a larger project. The one thing they have in common is the same package name.
So my manifest looks like this for each project:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test" android:versionCode="1"
android:versionName="1.0">
Both apps works fine, but when I debug App 1, it overwrites App 2 on the device. Then when I try to debug App 2, I get this error:
New package not yet registered with the system. Waiting 3 seconds before next attempt.
ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.test/.RegistrationActivity }
ActivityManager: Error type 3
ActivityManager: Error: Activity class {com.test/com.test.RegistrationActivity} does not exist.
Where RegistrationAcitvity is the Activity I am launching when the app starts.
I have found that if I clean App 2, then it installs and launches correctly. However, when this is done, App 1 no longer shows up on the device. Oddly enough, I am always able to launch App 1 from Eclipse, but after doing so I am back to the error above, which can again be fixed by clean on App 2.
The other strange thing that may or may not have something to do with this is the fact that every time I launch App 1, Eclipse automatically chooses the device I have plugged in. However, when I launch App 2, Eclipse always prompts me to choose a device. And yes, the deployment target option in the debug configuration is set to automatic — I’m not sure if this is related or not.
Any help is appreciated!
The package name for Android packages need to be unique.
source