Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:46:33+00:00 2026-06-07T02:46:33+00:00

I am trying to create an application to test how to use OpenStreetMaps API

  • 0

I am trying to create an application to test how to use OpenStreetMaps API but when I insert the jar file I get errors saying NoClassDefFoundError

stack trace

07-05 13:35:43.875: E/AndroidRuntime(9235): FATAL EXCEPTION: main
07-05 13:35:43.875: E/AndroidRuntime(9235): java.lang.ExceptionInInitializerError
07-05 13:35:43.875: E/AndroidRuntime(9235):     at com.example.osm.test.MainActivity.onCreate(MainActivity.java:16)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.app.Activity.performCreate(Activity.java:5008)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.app.ActivityThread.access$600(ActivityThread.java:130)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.os.Looper.loop(Looper.java:137)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at android.app.ActivityThread.main(ActivityThread.java:4745)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at java.lang.reflect.Method.invokeNative(Native Method)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at java.lang.reflect.Method.invoke(Method.java:511)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-05 13:35:43.875: E/AndroidRuntime(9235):     at dalvik.system.NativeStart.main(Native Method)
07-05 13:35:43.875: E/AndroidRuntime(9235): Caused by: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
07-05 13:35:43.875: E/AndroidRuntime(9235):     at org.osmdroid.views.MapView.<clinit>(MapView.java:64)
07-05 13:35:43.875: E/AndroidRuntime(9235):     ... 15 more

my Activity is as simple as this

public class MainActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    MapView mapView = new MapView(this,256); //fails
    mapView.setClickable(true);
    mapView.setBuiltInZoomControls(true);

    setContentView(mapView);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}


}

it fails as soon as it trys to create the mapview, is there another jar file I am suppose to have? currently I have osmdroid-android-3.0.8.jar, osmdroid-packager-3.0.8.jar and osmdroid-third-party-3.0.8.jar though i probably dont need the last 2 to actually create the map.

any help would be great

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:46:35+00:00Added an answer on June 7, 2026 at 2:46 am

    Yes, you need one more jar

    NoClassDefFoundError: org.slf4j.LoggerFactory 
    

    gives you the clue

    slf4j-android-1.5.8.jar is the jar you need

    Edit:

    It seems like there’s a later (1.6.6) version now, available at:
    latest slf4j

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a composite component for use in my Seam application, and
I am trying to create an initial-data.yml file for a Play! Framework application. Part
I'm trying to create a simple JavaScript test front-end for my WCF service, but
I am trying to create my first unit test. I use Zend Studio, and
Trying to make a django test application which will use stored oracle's procedures to
I'm trying to use modules in the ZF 1.8 project but can't get working
I am trying to create a test application the source is the following (index.php):
Im trying to create application from scratch. In new maven project i add a
I am trying to create an application compatible with both retina and non-retina displays.
I am trying to create BB application that features the in-app purchase. I followed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.