Android Eclipse NoClassDefFoundError for external .jar files

前端 未结 7 1120
野趣味
野趣味 2020-11-27 06:46

I have come across a strange error. I have an Android project that uses external libraries, in particular:

  • android-support-v4.jar (for Fragment support in Andr
7条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 07:21

    I ran into this error today too, because of updating to the Android SDK, r17. What the links that @aneal pointed out do not discuss is how to handle external runtime libraries (such as those imported under their own heading - not an imported user library).

    The easiest way to solve this problem is to change the build order in the build path. Simply right click on your project and select Properties. From here, select Java Build Path. At the top of the display, choose the tab order and export and move GoogleAdMobAdsSdk-4.3.1.jar above Android X (replacing x with the version you are using). Next, clean your project and run it. You should be good to go!

提交回复
热议问题