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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:04:39+00:00 2026-06-07T10:04:39+00:00

I have received forced closed error message on running the sample code of Google

  • 0

I have received forced closed error message on running the sample code of Google API.Is update a project is a solution to this type of project? If so then how to update project on window.The method given here don’t work on my case.

Here is code

Filename:HelloGoogleMaps.java

    package com.hellogooglemaps.practices;

    import com.google.android.maps.MapActivity;
    import com.google.android.maps.MapView;
    import android.os.Bundle;


    public class HelloGoogleMaps extends MapActivity {
     /** Called when the activity is first created. */
  @Override
   protected boolean isRouteDisplayed(){
    return false;
}

@Override 
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    MapView mapView = (MapView)findViewById(R.id.mapview);
    mapView.setBuiltInZoomControls(true);

}
@Override
protected boolean isLocationDisplayed(){
    return true;
}
}

HelloGoogleMaps Manifest

<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:label="@string/app_name"
        android:name=".HelloGoogleMapsActivity" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>        
    </activity>
    <activity android:name=".HelloGoogleMaps" android:label="@string/app_name"
          android:theme="@android:style/Theme.NoTitleBar" />
    <uses-library android:name="com.google.android.maps"/>
</application>

main.xml

    <?xml version="1.0" encoding="utf-8"?>
    <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:clickable="true"
             android:apiKey="0_hYeORLgQUROOOr_RXN2TWG2u2pCDoBYfLCV_w"
             />
  • 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-07T10:04:40+00:00Added an answer on June 7, 2026 at 10:04 am

    As you had mentioned in your code, You have only one Activity called HelloGoogleMaps and in your AndroidManifest you have declared two activities!! your HelloGoogleMapsActivity is useless. You are getting the error because you set HelloGoogleMapsActivity as the Launcher activity and this activity don’t even exist!!

    Solution:
    change your AndroidManifest.xml like that and you will get your app work if you had managed to get the apikey for your map correctly:

    <uses-sdk android:minSdkVersion="8" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:theme="@android:style/Theme.NoTitleBar"
            android:name=".HelloGoogleMaps" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>        
        </activity>
        <uses-library android:name="com.google.android.maps"/>
    </application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: Based on a couple of the answers I have received, I just want
Within my ajax call if an error is received I have an alert :
I have received a design which i am pretty sure is a flash website
I have received a CSV that has been converted/compressed/compacted into a SAV file from
I have received an assembly from a third party. I need to add it
We have received some JavaScript from an agency that looks wrong, but works. For
I have received requirements that ask to normalize text box content when the user
I have received a requirement to develop a feature to check if 2 email
Here is the situation. I have received a WSDL (and included XSD) from someone
I have an app that received JSON data from the server. Currently when I

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.