I am currently developing an Android
application and I'd like to use Graphhoper 0.3
embedded in the application (I have no way of setting up a server).
I am working with Android 4.0
, Eclipse Kepler
, Maven 3.2.1
, Android for Maven Eclipse 1.0.1
.
I first tried to pull branch 0.3 and set the "core" folder up as an Eclipse
project, then adding it in the Build Path of my android project. I also tried to use the graphhopper-0.3-android.jar
directly.
Android Project Main Activity onStart():
GraphHopper hopper = new GraphHopper().forMobile();
Unfortunately, everytime I got the following error:
java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
It does not pop in a regular Java project; only in Android.
I've tried to add the slf4j
JAR
's to the build path, with no success.
Any help would be greatly appreciated! It's my first post here, and I really don't know what I could try more. If you need any more information on my setup or anything, please ask!
Edit
Complete solution in comments of the validated answer.