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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:06:00+00:00 2026-06-08T13:06:00+00:00

I’m trying to use the google maps feature in android. I followed the instructions

  • 0

I’m trying to use the google maps feature in android. I followed the instructions at https://developers.google.com/maps/documentation/android/hello-mapview. But when I run the app, there seems to be some kind of problem. I’m not sure what it is but the app won’t load.
Here is the errors listed in the logcat.

07-26 02:01:01.771: ERROR/AndroidRuntime(158): ERROR: thread attach failed

07-26 02:01:06.761: ERROR/AndroidRuntime(211): Uncaught handler: thread main exiting due to uncaught exception

07-26 02:01:06.841: ERROR/AndroidRuntime(211): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.trainingcenter.maps/com.trainingcenter.maps.HelloGoogleMaps}: java.lang.ClassNotFoundException: com.trainingcenter.maps.HelloGoogleMaps in loader dalvik.system.PathClassLoader@43b7d958

07-26 02:01:06.841: ERROR/AndroidRuntime(211): Caused by: java.lang.ClassNotFoundException: com.trainingcenter.maps.HelloGoogleMaps in loader dalvik.system.PathClassLoader@43b7d958

07-26 02:01:06.931: ERROR/dalvikvm(211): Unable to open stack trace file '/data/anr/traces.txt': Permission denied

07-26 02:01:17.400: ERROR/AndroidRuntime(242): ERROR: thread attach failed

07-26 02:01:26.391: ERROR/ActivityThread(63): Failed to find provider info for com.google.settings

07-26 02:02:24.580: ERROR/AndroidRuntime(323): ERROR: thread attach failed

07-26 02:07:12.640: ERROR/AndroidRuntime(417): Uncaught handler: thread main exiting due to uncaught exception

07-26 02:07:12.640: ERROR/AndroidRuntime(417): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.trainingcenter.maps/com.trainingcenter.maps.HelloGoogleMaps}: java.lang.ClassNotFoundException: com.trainingcenter.maps.HelloGoogleMaps in loader dalvik.system.PathClassLoader@43d02ee8

07-26 02:07:12.640: ERROR/AndroidRuntime(417): Caused by: java.lang.ClassNotFoundException: com.trainingcenter.maps.HelloGoogleMaps in loader dalvik.system.PathClassLoader@43d02ee8

Can you tell me what’s wrong? Thanks for the help.

Here is the android manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.trainingcenter.maps" android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-library android:name="com.google.android.maps" />
<uses-permission android:name="android.permission.INTERNET" />

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".HelloGoogleMaps" 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>

Here is the activity

package com.trainingcenter.maps;

import android.os.Bundle;

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

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

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

@Override
protected boolean isRouteDisplayed() {
    // TODO Auto-generated method stub
    return false;
}
}

Here’s the main.xml file

<?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="I inserted the API key here, I got it from http://code.google.com/android/maps-api-signup.html" />

Btw, I’m using Google API level 2.1 update 1

  • 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-08T13:06:03+00:00Added an answer on June 8, 2026 at 1:06 pm

    <uses-library android:name="com.google.android.maps" /> Needs to be within the <application> tag

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.trainingcenter.maps"
        android:versionCode="1"
        android:versionName="1.0" >
    
        <uses-sdk android:minSdkVersion="7" />
    
        <uses-permission android:name="android.permission.INTERNET" />
    
        <application
            android:icon="@drawable/icon"
            android:label="@string/app_name" >
            <uses-library android:name="com.google.android.maps" />
    
            <activity
                android:name=".HelloGoogleMaps"
                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>
    
    </manifest>
    

    Edit:

    In your xml file, i’d also add the android:enabled="true"

    <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:enabled="true"
        android:apiKey="I inserted the API key here, I got it from http://code.google.com/android/maps-api-signup.html"
        android:clickable="true" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm making a simple page using Google Maps API 3. My first. One marker
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported

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.