Unable to instantiate activity… Caused by ClassNotFoundException

前端 未结 4 977
无人及你
无人及你 2020-12-17 23:46

After converting a perfectly working application to a library (including its Activity class!), I am trying to create an application that uses that entire library by simply s

4条回答
  •  臣服心动
    2020-12-18 00:13

    I finally solved the problem. It turns out that I had 2 critical settings in the Properties of both projects not set correctly:

    1. In the library project, "Is Library" was not checked for some reason. I could swear that I checked it, but knowing how whimsical the Android development environment under Eclipse can be, I suspect that it was unchecked by Eclipse (or the ADT plugin) as a result of some glitch.
    2. In the application project, I neglected to add my library project as a reference via the Add... button. (how dumb could I be?)

    I hope that other newbies like me will find this information helpful. Sometimes, an extremely difficult problem to debug, hides a configuration error when the innocent unsuspecting stressed programmer assumes that this is already has been taken care of...

提交回复
热议问题