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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:38:48+00:00 2026-06-04T01:38:48+00:00

When I create a MapActivity I got this error 05-15 23:31:37.231: E/AndroidRuntime(760): FATAL EXCEPTION:

  • 0

When I create a MapActivity
I got this error

05-15 23:31:37.231: E/AndroidRuntime(760): FATAL EXCEPTION: main
05-15 23:31:37.231: E/AndroidRuntime(760): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{pit.opensource.mapapp/pit.opensource.mapapp.M1MapAppActivity}: java.lang.ClassNotFoundException: pit.opensource.mapapp.M1MapAppActivity in loader dalvik.system.PathClassLoader[/data/app/pit.opensource.mapapp-2.apk]
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.os.Looper.loop(Looper.java:130)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.app.ActivityThread.main(ActivityThread.java:3683)
05-15 23:31:37.231: E/AndroidRuntime(760):  at java.lang.reflect.Method.invokeNative(Native Method)
05-15 23:31:37.231: E/AndroidRuntime(760):  at java.lang.reflect.Method.invoke(Method.java:507)
05-15 23:31:37.231: E/AndroidRuntime(760):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-15 23:31:37.231: E/AndroidRuntime(760):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-15 23:31:37.231: E/AndroidRuntime(760):  at dalvik.system.NativeStart.main(Native Method)
05-15 23:31:37.231: E/AndroidRuntime(760): Caused by: java.lang.ClassNotFoundException: pit.opensource.mapapp.M1MapAppActivity in loader dalvik.system.PathClassLoader[/data/app/pit.opensource.mapapp-2.apk]
05-15 23:31:37.231: E/AndroidRuntime(760):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
05-15 23:31:37.231: E/AndroidRuntime(760):  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
05-15 23:31:37.231: E/AndroidRuntime(760):  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-15 23:31:37.231: E/AndroidRuntime(760):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)

where the AndroidManifest.xml file is :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="pit.opensource.mapapp"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="10" />
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".M1MapAppActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

what is the problem ???

update

the code for MapActivity class :

package pit.opensource.mapapp;


import android.content.Context;
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;
import com.google.android.maps.OverlayItem;

public class M1MapAppActivity extends MapActivity {

    private MapController mapController;
    private MapView mapView;
    private LocationManager locationManager;
    private MyOverlays itemizedoverlay;
    private MyLocationOverlay myLocationOverlay;

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.main); // bind the layout to the activity

        // Configure the Map
        mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
        mapView.setSatellite(true);
        mapController = mapView.getController();
        mapController.setZoom(14); // Zoon 1 is world view
        locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
        locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,
                0, new GeoUpdateHandler());

        myLocationOverlay = new MyLocationOverlay(this, mapView);
        mapView.getOverlays().add(myLocationOverlay);

        myLocationOverlay.runOnFirstFix(new Runnable() {
            public void run() {
                mapView.getController().animateTo(
                        myLocationOverlay.getMyLocation());
            }
        });

        Drawable drawable = this.getResources().getDrawable(R.drawable.point);
        itemizedoverlay = new MyOverlays(this, drawable);
        createMarker();
    }

    @Override
    protected boolean isRouteDisplayed() {
        return false;
    }

    public class GeoUpdateHandler implements LocationListener {

        @Override
        public void onLocationChanged(Location location) {
            int lat = (int) (location.getLatitude() * 1E6);
            int lng = (int) (location.getLongitude() * 1E6);
            GeoPoint point = new GeoPoint(lat, lng);
            createMarker();
            mapController.animateTo(point); // mapController.setCenter(point);

        }

        @Override
        public void onProviderDisabled(String provider) {
        }

        @Override
        public void onProviderEnabled(String provider) {
        }

        @Override
        public void onStatusChanged(String provider, int status, Bundle extras) {
        }
    }

    private void createMarker() {
        GeoPoint p = mapView.getMapCenter();
        OverlayItem overlayitem = new OverlayItem(p, "", "");
        itemizedoverlay.addOverlay(overlayitem);
        if (itemizedoverlay.size() > 0) {
            mapView.getOverlays().add(itemizedoverlay);
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        myLocationOverlay.enableMyLocation();
        myLocationOverlay.enableCompass();
    }

    @Override
    protected void onPause() {
        super.onResume();
        myLocationOverlay.disableMyLocation();
        myLocationOverlay.disableCompass();
    }
}
  • 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-04T01:38:49+00:00Added an answer on June 4, 2026 at 1:38 am

    add in your Manifest
    <uses-library android:name="com.google.android.maps" />
    in the <application> </application> Tag

    this gonna solve your class not found exception.

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

Sidebar

Related Questions

create table ImagenesUsuario { idImagen int primary key not null IDENTITY } This doesn't
Create a new appdomain, setup the assemblyResolve handler and you always get an exception
I don't know how to create an custom Activity extending MapActivity and ListActivity ?
Hey Guys i got this code in my Activity: public class MYAppActivity extends Activity{
This is my MapActivity Class, it should read the address from the string, reverse
Ok I've asked this before. Got one answer. I'm going to go more in
I want to create a blinking cursor in a TextView.. So far i got
This is my first Android app and I've encountered an exception when trying to
I created a new MapActivity class MapProba . From main Activity I want to
I tried to create a tabbed Android app, but got stuck with one strangle

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.