I recently published an app to the market and I\'m now getting an error by some user, the app presumably crashes right when it starts. Unfortunately I can\'t contact him dir
I was just having a problem with this myself, so I want to bring up what caused the problem for me. I had just included some new libraries setting up expansion APKs. The libraries are dependant on each other and I was only including one of them in my properties > android > libraries.
So this could happen if the user is missing a library on their phone that most users have.
It showed ClassNotFoundException
on my main activity because it implements a class which was in the missing library.
I don't see anything obviously wrong. All I can say is to try to test it in as many different configurations as possible.
Test it in the emulator for every possible SDK level, follow the guidelines for testing on different sized screens (although that doesn't seem to be your problem).
Try to test it on a phone from each of the major providers, if you can find friends that have them: HTC Sense, Motoblur, etc.
If you only get one report, it might just be something screwy with that guys device. See if you get other, similar reports that add more data.
Are you sure your package name is unique? I don't know what happen if the user has another app using the same package name, but maybe it can cause strange errors like this.
EDIT: I just saw this page, it remembers me I already had this problem when downloading an app from the Android market. The app crashed on startup, I tried a lot of times but I always ended with the same result. Then I tried to uninstall the app, reinstall it, and everything worked fine. I'm still using it today and the problem never happened again.
On my link, you can also see that they reproduced your error by making the app unreachable (unmount SD), so it's definitely not a problem with your code.
I had the same issue in a recent Android project. The problem turned out to be pretty simple yet it was hard to locate. This happened to me then I refactored the package name of the entry point activity of the app. This created a conflict with the gen/.../R.java file, since the package there was not refactored. Eclipse did not complain, but at runtime i got the same error you posted: could not instantiate... classNotFoundException...
Lesson learned from this: do NOT refactor the package name that holds your main activity!
Hope this helps you or anyone breaking his/her head over this error!
I was coming across this problem when I was including java Projects in my buildpath for my android project targeting JavaSE-1.7.
For some reason my emulator would not throw a class not found if the java project it was including was originally created targeting JavaSE-1.6. Eclipse would give me a warning "Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment." But the Android emulator would launch and I would not get a classnotfoundexception
So if you are including projects that target JavaSE-1.7, remake them targeting JavaSE-1.6 and this may solve your problem.
Good luck!
This problem might exist when you change the name of your class and update the manifest file and the manifest file is not updated on the emulator. Try uninstall the application from emulator and then reinstall it. This will work.