Android: Unable to instantiate activity / ClassNotFoundException

前端 未结 30 2742
粉色の甜心
粉色の甜心 2020-11-27 13:46

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

相关标签:
30条回答
  • 2020-11-27 14:34

    What I had to do is just re-do the building/exporting process with no modification to the code whatsoever. It worked for me, which I did was to export it two times. On my first export, the build APK has lower file size and the second export (with no any modification to the code/configuration) produced a slightly larger file size (about 200KB diff).

    This bug in building is really costly, kills you in front of your manager, and should be really fixed by Android/Eclipse team. Kind of sucks

    0 讨论(0)
  • 2020-11-27 14:35

    This problem can also occur if you have a constructor with one or more parameters in your activity class.

    0 讨论(0)
  • 2020-11-27 14:35

    I had the same problem I solved it by uncheck the Android Dependencies from Project--> Properties-->Java builder Path-->android dependencies

    0 讨论(0)
  • 2020-11-27 14:36

    I don't know why the path in the PathClassLoader is different to your package name but when testing on the emulator try forcing a close then run it again, as per this link

    0 讨论(0)
  • 2020-11-27 14:36

    Look at the package defined at the top of the manifiest file and make sure that it matches the package where you class is defined.

    My problem was that I did not have matching package names.

    Also enusre that you have a folder named "libs" with an 's'. Put all of you jar files that you added inside it and add to build path.

    0 讨论(0)
  • 2020-11-27 14:39

    I fix this problem by deleting "bin" and "gen" folder, and rebuilding project.

    0 讨论(0)
提交回复
热议问题