Android Unable to instantiate activity: Didn't find class on path

后端 未结 3 1665
感动是毒
感动是毒 2020-11-27 07:38

I\'ve imported project into eclipse and when I try to run it, then this exception is thrown:

java.lang.RuntimeException: Unable to instantiate activity Compone

3条回答
  •  -上瘾入骨i
    2020-11-27 08:23

    I suppose you're using Eclipse. Your activity is there alright, but Eclipse didn't include the support package in the APK ... If you look above your error in stacktrace you will notice the root of your problem: "Unable to find FragmentActivity". Or you can unpack the apk, undex it and you will see the compatibility package classes were not included.

    To fix this, right-click your project, properties, build path and go to export tab. There make sure "Android private libraries" are checked. A clean and rebuild should put you on track ...

提交回复
热议问题