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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:55:55+00:00 2026-06-18T04:55:55+00:00

all: I’m a new starter of android. Now I’m going to run an Android

  • 0

all:

I’m a new starter of android. Now I’m going to run an Android Maps V2 project. I followed step by step as described in https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw, failed and tried many times, but i continually encounter the following :

02-03 01:48:48.783: E/AndroidRuntime(11547): FATAL EXCEPTION: main
02-03 01:48:48.783: E/AndroidRuntime(11547): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.googlemapdemo/com.example.googlemapdemo.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1968)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.ActivityThread.access$600(ActivityThread.java:127)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.os.Handler.dispatchMessage(Handler.java:99)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.os.Looper.loop(Looper.java:137)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.ActivityThread.main(ActivityThread.java:4507)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at java.lang.reflect.Method.invokeNative(Native Method)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at java.lang.reflect.Method.invoke(Method.java:511)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at dalvik.system.NativeStart.main(Native Method)
02-03 01:48:48.783: E/AndroidRuntime(11547): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:271)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.Activity.setContentView(Activity.java:1835)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.example.googlemapdemo.MainActivity.onCreate(MainActivity.java:18)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.Activity.performCreate(Activity.java:4465)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1932)
02-03 01:48:48.783: E/AndroidRuntime(11547):    ... 11 more
02-03 01:48:48.783: E/AndroidRuntime(11547): Caused by: java.lang.RuntimeException: API key not found.  Check that <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml
02-03 01:48:48.783: E/AndroidRuntime(11547):    at maps.y.z.a(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at maps.y.z.a(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at maps.y.z.a(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at maps.y.ae.a(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at maps.y.bu.a(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at maps.y.p.onCreateView(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.google.android.gms.maps.internal.IMapFragmentDelegate$Stub.onTransact(IMapFragmentDelegate.java:107)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.os.Binder.transact(Binder.java:297)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.google.android.gms.maps.internal.IMapFragmentDelegate$a$a.onCreateView(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.google.android.gms.maps.MapFragment$b.onCreateView(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.google.android.gms.internal.d$4.a(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.google.android.gms.internal.d.a(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.google.android.gms.internal.d.onCreateView(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at com.google.android.gms.maps.MapFragment.onCreateView(Unknown Source)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:806)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1010)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1108)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.app.Activity.onCreateView(Activity.java:4243)
02-03 01:48:48.783: E/AndroidRuntime(11547):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
02-03 01:48:48.783: E/AndroidRuntime(11547):    ... 21 more

Here is my project, it is very basic and short. Perhaps there’s a very common mistake, but if you can point to me, I would be very grateful!

activity_main.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >

    <fragment
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.MapFragment" />

</RelativeLayout> 

AndroidMenifest.xml:

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
    <permission
        android:name="com.example.googlemapdemo.permission.MAPS_RECEIVE"
        android:protectionLevel="signature"/>
    <uses-permission android:name="com.example.googlemapdemo.permission.MAPS_RECEIVE"/>
    <!-- Copied from Google Maps Library/AndroidManifest.xml. -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <!-- External storage for caching. -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <!-- My Location -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <!-- Maps API needs OpenGL ES 2.0. -->
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>
    <!-- End of copy. -->

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.googlemapdemo.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data
               android:name="com.google.android.maps.v2.API_KEY"
               android:value="xxxx"/>
        </activity>
    </application>

</manifest>

MainActivity.java:

package com.example.googlemapdemo;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.SupportMapFragment;

import android.os.Bundle;
import android.app.Activity;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;


public  MainActivity extends Activity  {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mGMap = ((MapFragment)  getFragmentManager().findFragmentById(R.id.map))
               .getMap();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    private GoogleMap mGMap;
}
  • 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-18T04:55:57+00:00Added an answer on June 18, 2026 at 4:55 am

    You are attempting to use SupportMapFragment in something other than a FragmentActivity. This will not work. Either convert MainActivity to extend FragmentActivity, or use MapFragment instead of SupportMapFragment. The latter approach will limit your app to API Level 11 or higher.

    In addition, as the stack trace tells you, you do not have the <meta-data> element in your manifest with your API key.

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

Sidebar

Related Questions

All, If I run a query like the following: $qry = Select wrong_column from
All my files can be found on GitHub: https://github.com/Integralist/Passage (just in case you need
All, I am new to MVVM, so please be gentle. I have just learnt
All .js and .less files are builded in my project with gruntjs (built-in .js
All - Need some insight into this issue. I have created a sample project
all. I'm a very, very new programmer. My language of choice at the moment
All, I'm trying to split my MSTest test run into multiple runs because I'm
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All, If I've go the following database fields/values: user_id field_name field_value 1 EventHour1 1

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.