问题
When trying to run my application on the emulator I get an error from the activitymanager:
ActivityManager: Error type 3
My activity exists, is listed in the manifest (in fact, its the MAIN launcher activity).
Anyone know what this error means?
回答1:
If you are running Eclipse try Projects-->Clean... and clean the project before running again.
回答2:
i faced the same issue. I cleaned the project and removed the android:enabled=false in android manifest. This solved the issue.
回答3:
Check "android:installLocation" in your AndroidManifest.xml.
"preferExternal" will cause the problem.
回答4:
I got this error because I used invalid characters in my project name and Android didn't warned me about it so I had no idea that was the problem...
Example: "Thís ís íncorrect!"
回答5:
nothing to worry about that it happens sometimes when activity manager unable to find activity of your app that means your target that is emulator is not started yet or may be because of following reason:
when you try to run your app on emulator you may be cancled in between building or forcefully closed your emulator.In that case when try to start emulator again it will sometimes not maximized. now you have to restart your eclipse and then launch emulator and run your app now you will not face this type of error
回答6:
Dont remember how I fixed this - most probably I wiped the local copy and re-checked out of svn.
回答7:
ActivityManager: Error type 3 I don't know how true it is, but I used the same shared preferences file from another app..and got this error. I chose a new name for the shared preferences and the problem has gone away. It's working now
回答8:
I had not enough space on my phone, that's why I had this problem. So I cleaned it and go RUN )
回答9:
I got this error when I mistakenly added a second application
tag in my manifest as I was trying to add hardware acceleration to my app:
<application
android:hardwareAccelerated="true" />.
I added it above my actual application tag and I think this resulted in Android deploying an empty 'app' to my phone. It reported 'Installation success' in the logs and yet there was no launcher icon. It did appear, though, under Settings -> Apps but the only thing I could do there was to uninstall it. Hope this helps someone.
回答10:
Thus, it seems there can be many reasons to see this error.
For those who can't fix it using the above mentioned methods:
In my case, i renamed the name of my activity (using F2 in Eclipse) and it is fixed.
来源:https://stackoverflow.com/questions/2677643/cannot-run-android-application-on-emulator-device-activity-doesnt-exist