I have 2 projects in my Eclipse. Both of them have a activity called “MainActivity”. The weird thing is, when I tried to launch the 2nd app, the emulator showed an error and pointed it to the 1st app. I can bypass this problem by changing the activity name to something different. Then everything will be fine.
I suppose this is only a emulator problem. I haven’t tested it yet but I cannot image this happening on real devices, which will make Android totally unusable.
But still, I need to use the emulator and I’d like to keep the name MainActivity. Has anyone has the same experience before? Thanks in advance.
Do you also have the same package name?
Applications are distinguished by their package names so you should change those on per-project basis.
Update:
In manifest
packageattribute is prepended tonameattribute of Activity. Combined they must be the same as your full qualified class name.