1

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
Krish
  • 437
  • 4
  • 14
DoubleDunk
  • 909
  • 3
  • 11
  • 29
  • 1
    do you deploy the external jar with your application? – ma cılay Mar 27 '12 at 20:35
  • possible duplicate of [Gson NoClassDefFoundError after ADT and SDK Tools update to v17](http://stackoverflow.com/questions/9820675/gson-noclassdeffounderror-after-adt-and-sdk-tools-update-to-v17) – CommonsWare Mar 27 '12 at 20:38

2 Answers2

11

You need to go into Build Path/Order and Export, and check the libs as of SDK 17. Then clean your project.

sastraxi
  • 1,330
  • 11
  • 21
0

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.

Shekhar
  • 151
  • 1
  • 2
  • 20