Android Activity ClassNotFoundException - tried everything

前端 未结 15 2281
有刺的猬
有刺的猬 2020-11-22 12:02

I\'ve just refactored an app into a framework library and an application, but now when I try and start the app in the emulator I get the following error stack trace:

15条回答
  •  旧时难觅i
    2020-11-22 12:59

    i've tested the code that you've given , and it works fine. try changing the "extends SimonSaysActivity " to simply "extends Activity " and see for yourself that it works .

    the reason that it doesn't work is either SimonSaysActivity doesn't extend Activity (which i don't think you've made this mistake) , or the order of the build path is wrong .

    to go to the order of the build path , go to :

    project->properties->Java build path->order and export .
    

    my basic order is : project src , project gen , android 4.0.3 , android dependencies .

    this problem usually occurs when you use libraries .

提交回复
热议问题