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

  • Home
  • SEARCH
  • 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 6852725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:25:37+00:00 2026-05-27T01:25:37+00:00

I’ve been playing around with this for some time now and am hoping that

  • 0

I’ve been playing around with this for some time now and am hoping that someone smarter than I will be able to help. My boss has given me an opportunity to learn to develop Android apps and I’m struggling with this one issue. I need to build several apps with multiple activities but can’t seem to get past this point. I’m sure it’s a problem in my coding, but with so many different ways of doing things, I’m a little confused at this point.

I am building an app that opens a Main activity with two buttons on the page. One is the close button and works fine. I want the next button to open a mapActivity that is set to my campus’ location. I am not a student working on a project I just work for a community college. 😉

What’s really wierd is that the EXACT same google.maps code works fine by itself. I just can’t get the button to open the Activity without crashing.

Here is my manifest.xml, main.xml, my main.java, Map.java and map.xml. would you please comment and point me in the right direction?

Thanks in advance,
Dave

here are two errors:

11-21 14:50:58.968: W/dalvikvm(437): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
11-21 14:50:58.978: E/AndroidRuntime(437): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=edu.mtsac.mapproject.MAP }

This says the Activity was not found but I can see it in my source files, and in the manifest here:

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

<uses-sdk
    android:minSdkVersion="3"
    android:targetSdkVersion="8" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <uses-library android:name="com.google.android.maps" />

    <activity
        android:label="@string/app_name"
        android:name=".Main" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />

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

    <!-- map activity -->
    <activity
        android:label="Map"
        android:name=".Map" >

        <intent-filter >
            <action android:name="edu.mtsac.mapproject.MAP" />

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

</manifest>

My Main.xml and Map.xml files are simple:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<Button
    android:id="@+id/mapBtn"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:text="Map" />   

</RelativeLayout>

Map.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.google.android.maps.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="0jevUfyLD_b1Eikgpm_mo7KVDspzhPJdRDDaxEw"
    android:clickable="true"
    android:enabled="true" />

</LinearLayout>

the Main.java

package edu.mtsac.mapproject;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Main extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

     Button mapBtn = (Button) findViewById(R.id.mapBtn);
             mapBtn.setOnClickListener(new View.OnClickListener() {

                 public void onClick(View v) {
                   startActivity(new Intent(Main.this, Map.class));
                 }
            });


        Button closeBtn = (Button) findViewById(R.id.closeBtn);
    closeBtn.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            finish();
        }
    });

};// end onCreate()
}

and lastly the Map.java

package edu.mtsac.mapproject;

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;

public class Map extends MapActivity {

MapController mc;
GeoPoint p;
MapView mapview;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.map);

    mapview = (MapView) findViewById(R.id.mapView);
    mapview.displayZoomControls(true);
    mapview.setBuiltInZoomControls(true);
    mapview.setSatellite(true);

    mc = mapview.getController();
    String coord[] = { "34.047517", "-117.847050" };

    double lat = Double.parseDouble(coord[0]);
    double lng = Double.parseDouble(coord[1]);

    p = new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6));

    mc.animateTo(p);
    mc.setZoom(17);
    mapview.invalidate();
}

@Override
protected boolean isRouteDisplayed() {
    return false;
}
}
  • 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-05-27T01:25:37+00:00Added an answer on May 27, 2026 at 1:25 am

    I don’t see any activity in your manifest registered to handle this action edu.mtsac.mapproject.MAP. I assume that exception is happening when you call:

    startActivity(new Intent("edu.mtsac.mapproject.MAP"));
    

    It looks like you’re probably trying to start your Map Activity for which you don’t need to specify an Action. Just do something like:

    startActivity(new Intent(this, Map.class));
    

    You probably want to read this doc on intents to understand what’s really going on here and how you should be using these classes.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I know there's a lot of other questions out there that deal with this
I need a function that will clean a strings' special characters. I do NOT
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.