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 7743275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:29:30+00:00 2026-06-01T09:29:30+00:00

I’m trying to launch a very simple android application using OpenStreetMaps-Tools for Android ,

  • 0

I’m trying to launch a very simple android application using OpenStreetMaps-Tools for Android, and I have nothing but runtime errors.

Android virtual device: Platform 2.2, API level 8, SD card 1024MiB.

My IDE is IntelliJ Idea 11.

Here is my AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="test.osmdroid005"
          android:versionCode="1"
          android:versionName="1.0" >
<uses-sdk android:minSdkVersion="7" />
<application
        android:label="@string/app_name" >
    <activity
            android:name=".TestActivity"
            android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

And main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<org.osmdroid.views.MapView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:apiKey="(my-google-key)"
        android:clickable="true"
        />
</LinearLayout>

And TestActivity.java:

package test.osmdroid005;

import android.app.Activity;
import android.os.Bundle;
import org.osmdroid.views.MapView;
import test.osmdroid005.R;

public class TestActivity extends Activity
{
    protected MapView mapView;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
    }
    protected boolean isRouteDisplayed() {
        // TODO Auto-generated method stub
        return false;
    }
}

Here is error log:

    03-31 19:00:19.231: ERROR/vold(27): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
03-31 19:00:19.231: ERROR/vold(27): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory)
03-31 19:00:19.231: ERROR/vold(27): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
03-31 19:00:19.231: ERROR/vold(27): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory)
03-31 19:00:32.202: ERROR/BatteryService(52): usbOnlinePath not found
03-31 19:00:32.202: ERROR/BatteryService(52): batteryVoltagePath not found
03-31 19:00:32.202: ERROR/BatteryService(52): batteryTemperaturePath not found
03-31 19:00:32.241: ERROR/SurfaceFlinger(52): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
03-31 19:00:36.791: ERROR/AndroidRuntime(77): ERROR: thread attach failed
03-31 19:00:39.451: ERROR/EventHub(52): could not get driver version for /dev/input/mouse0, Not a typewriter
03-31 19:00:39.451: ERROR/EventHub(52): could not get driver version for /dev/input/mice, Not a typewriter
03-31 19:00:39.731: ERROR/System(52): Failure starting core service
        java.lang.SecurityException
        at android.os.BinderProxy.transact(Native Method)
        at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
        at android.os.ServiceManager.addService(ServiceManager.java:72)
        at com.android.server.ServerThread.run(SystemServer.java:176)
03-31 19:00:39.751: ERROR/AndroidRuntime(52): Crash logging skipped, no checkin service
03-31 19:00:47.436: ERROR/ActivityThread(114): Failed to find provider info for android.server.checkin
03-31 19:00:49.037: ERROR/ActivityThread(114): Failed to find provider info for android.server.checkin
03-31 19:00:49.127: ERROR/ActivityThread(114): Failed to find provider info for android.server.checkin
03-31 19:00:52.656: ERROR/MediaPlayerService(31): Couldn't open fd for content://settings/system/notification_sound
03-31 19:00:52.686: ERROR/MediaPlayer(52): Unable to to create media player
03-31 19:00:58.476: ERROR/ActivityThread(52): Failed to find provider info for com.google.settings
03-31 19:00:58.476: ERROR/ActivityThread(52): Failed to find provider info for com.google.settings
03-31 19:01:01.207: ERROR/AndroidRuntime(201): ERROR: thread attach failed
03-31 19:01:04.167: ERROR/AndroidRuntime(235): ERROR: thread attach failed
03-31 19:01:04.466: ERROR/AndroidRuntime(249): Uncaught handler: thread main exiting due to uncaught exception
03-31 19:01:04.496: ERROR/AndroidRuntime(249): java.lang.RuntimeException: Unable to start activity ComponentInfo{test.osmdroid005/test.osmdroid005.TestActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class org.osmdroid.views.MapView
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
        at android.app.ActivityThread.access$2200(ActivityThread.java:119)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:123)
        at android.app.ActivityThread.main(ActivityThread.java:4363)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:521)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
        at dalvik.system.NativeStart.main(Native Method)
        Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class org.osmdroid.views.MapView
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
        at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
        at android.app.Activity.setContentView(Activity.java:1622)
        at test.osmdroid005.TestActivity.onCreate(TestActivity.java:19)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
        ... 11 more
        Caused by: java.lang.ClassNotFoundException: org.osmdroid.views.MapView in loader dalvik.system.PathClassLoader@44da2698
        at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
        at android.view.LayoutInflater.createView(LayoutInflater.java:466)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
        ... 20 more

I also included slf4j-1.6.1-jul.jar, osmdroid-android-3.0.7.jar and android.jar(API 8) libraries.

What’s wrong? Or what I must add to my project?

  • 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-01T09:29:31+00:00Added an answer on June 1, 2026 at 9:29 am

    I’m not familiar with IntelliJ as I use Eclipse but think you have the wrong sl4j jar in your project. You should use slf4j-android-1.5.8.jar I think. You don’t need an API key for an Osmdroid maps project – only GoogleMaps requires it.

    Below is the smallest Osmdroid sample I have, it’s essentially the same as yours, but it centres the map for you to a specific GeoPoint

    package osmdemo.demo;
    
    import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
    import org.osmdroid.util.GeoPoint;
    import org.osmdroid.views.MapController;
    import org.osmdroid.views.MapView;
    
    import android.app.Activity;
    import android.os.Bundle;
    public class OsmdroidDemoMap extends Activity {
    
        private MapView         mMapView;
        private MapController   mMapController;
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
                setContentView(R.layout.osm_main);
            mMapView = (MapView) findViewById(R.id.mapview);
            mMapView.setTileSource(TileSourceFactory.MAPNIK);
            mMapView.setBuiltInZoomControls(true);
            mMapController = mMapView.getController();
            mMapController.setZoom(13);
            GeoPoint gPt = new GeoPoint(51500000, -150000);
            //Centre map near to Hyde Park Corner, London
            mMapController.setCenter(gPt);
    
        }
    }
    

    .

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.