Simple android application with roboguice throwing exceptions

后端 未结 2 651
故里飘歌
故里飘歌 2021-01-21 13:56

I have a very simple application that works but when i add roboguice it throws

java.lang.RuntimeException: Unable to instantiate application com.MyFirst

相关标签:
2条回答
  • 2021-01-21 14:12

    Well i found out what the problem was. i was using SDK v17+ and in that version external library's need te be placed in a "libs" folder and only in the libs folder. so all the tutorial's i found where they just put it in the assets folder where wrong.

    Link to where i got the answer i was looking for: http://groups.google.com/group/roboguice/browse_thread/thread/474116b052050ae2

    0 讨论(0)
  • 2021-01-21 14:19

    First of all, extending from RoboApplication is a RoboGuice 1.x thing, you should really be using RoboGuice 2.0 (where you no longer need to do that). Now, for your exception, is your Application class really at com.MyFirstApp.MyApplication? If not, you would need to update the name attribute to match.

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