Android: Unable to instantiate activity / ClassNotFoundException

前端 未结 30 3118
粉色の甜心
粉色の甜心 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:14

    I had the same problem of you and, after hours of search, I discovered something interesting. I'll try to expose that as clearly as possible:

    • I created a project with a package called "myapp.sound" containing the activity. Program ran normally;
    • I renamed that package calling it "app.soundapp" and program still ran normally.

    However, in the manifest.xml file of the program there was something strange: the name of package was the old "myapp.sound". I changed manifest with correct new name and, from that moment on, our error occured. I don't know why, but seems that the "package name changer" of Eclipse doesn't update all the dependencies. If it's not strictly necessary, don't rename the package containing activity. Maybe, to solve your problem you have to create a new project and copy inside it all your java class.

提交回复
热议问题