0

I am trying to import this library in my android project

https://github.com/twotoasters/clusterkraf

I imported it, and then added it to build path, then when I run my app, it crashes with this log:

08-05 17:50:31.268: E/AndroidRuntime(29392): FATAL EXCEPTION: main
08-05 17:50:31.268: E/AndroidRuntime(29392): java.lang.NoClassDefFoundError: com.twotoasters.clusterkraf.InputPoint
08-05 17:50:31.268: E/AndroidRuntime(29392):    at com.example.idsconnect.ActivityMap.initClusterkraf(ActivityMap.java:165)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at com.example.idsconnect.AsyncLoadMapLocations.onPostExecute(AsyncLoadMapLocations.java:61)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at com.example.idsconnect.AsyncLoadMapLocations.onPostExecute(AsyncLoadMapLocations.java:1)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at android.os.AsyncTask.finish(AsyncTask.java:631)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at android.os.AsyncTask.access$600(AsyncTask.java:177)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at android.os.Handler.dispatchMessage(Handler.java:99)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at android.os.Looper.loop(Looper.java:137)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at android.app.ActivityThread.main(ActivityThread.java:4950)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at java.lang.reflect.Method.invokeNative(Native Method)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at java.lang.reflect.Method.invoke(Method.java:511)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
08-05 17:50:31.268: E/AndroidRuntime(29392):    at dalvik.system.NativeStart.main(Native Method)

enter image description here

Does anyone know how to fix this?

Thanks.

omega
  • 40,311
  • 81
  • 251
  • 474
  • How are you adding the library to the build path? In the documentation, it suggests "referenc(ing) it from your app as a library project" – loeschg Aug 05 '13 at 22:07
  • My project already contains the google play services. The way I import it is first I do file > import > existing android project code. Then I right click my project > android > add reference, and chose the clustering library. After that I am getting errors in my activity where I cannot extend the FragmentActivity and cannot resolve GoogleMap class. Im not sure but I think my google play services library is conflicting with the project I am trying to import because it also has it. – omega Aug 05 '13 at 22:21
  • If you click on the "clusterkraf-master/li..." project in the screenshot above, is the "Is Library" checkbox checked? – loeschg Aug 06 '13 at 15:15

2 Answers2

0

I would imagine that you may need to add the Google Play Services library to your project. See here for more details.

Without having all the details, the problem may be that the InputPoint class is importing classes from the com.google.android.gmspackage, which is part of the Google Play Service SDK. So if those classes are not present you are going to run into problems.

Community
  • 1
  • 1
Stephen Asherson
  • 1,557
  • 14
  • 23
  • My project already has the google play services added to it, and the project I am trying to import also has it. – omega Aug 05 '13 at 22:23
0

Have you tried importing the google-play-services.jar in addition to the google-play-services_lib? I would think that'd all be taken care of clusterkraf library, but it's worth a shot (can found here: google-play-services_lib/libs/google-play-services.jar).

The new Google Maps (v2) integration is such a headache :(

loeschg
  • 29,961
  • 26
  • 97
  • 150