简体   繁体   中英

java.lang.NoClassDefFoundError: how do I fix this error?

I am developing an Android application which makes use of the Osmdroid maps api. I have added the library as an external jar in my build path and I do not get any errors during compile time. However, upon device deployment I get the following error:

03-27 16:18:50.986: E/AndroidRuntime(3306): java.lang.NoClassDefFoundError: org.osmdroid.util.GeoPoint

I have done some googgling and it is still a mystery to me.

Here is my IDE configuration.

Eclipse: Indigo Release version 2  
Java SDK: 1.6.0_31  
Android SDK: 17

您需要进入Build Path / Order and Export,并从SDK 17开始检查库。然后清理您的项目。

I doubt about you and your project. From my viewpoint, I see you have a good design. But why are you working with Build Path / Order and Export? Honestly I've never gone to that tab from the first day I worked with Eclipse.

To import jar files as libraries, use tab Libraries -> add external Jars.

And I'm sorry I don't know about game programming, this is just a suggestion: make sure your engine fits what Android supports. For example Android doesn't support javax.imageio. If not, the app can be compiled with external jars, but can be crashed in runtime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM