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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:03:48+00:00 2026-06-18T03:03:48+00:00

I have just followed this tutorial ( https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2 ) to present the Google Maps.

  • 0

I have just followed this tutorial (https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2) to present the Google Maps. However, when I try to initialize the application in my phone (ZTE V875) I get an error, or better saying a list of errors. Does anyone know why? Thanks in advance.

In my MainActivity.class I have the following code:

package com.example.tutorialgooglemaps;


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

public class MainActivity extends FragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);  
    }

    @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;
    }

}

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.google.android.gms.maps.SupportMapFragment" />

Manifest

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

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

        <permission
          android:name="com.example.tutorialgooglemaps.permission.MAPS_RECEIVE"
          android:protectionLevel="signature"/>

        <uses-permission android:name="com.example.tutorialgooglemaps.permission.MAPS_RECEIVE"/>
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

        <uses-feature
            android:glEsVersion= "0x00020000"
            android:required="true"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="MYKEY"/>

        <activity
            android:name="com.example.tutorialgooglemaps.MainActivity"
            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>

Error output

01-28 18:21:59.219: I/Process(22828): Sending signal. PID: 22828 SIG: 9
01-28 18:22:23.499: E/ActivityThread(22977): >>> handling: 110
01-28 18:22:23.509: D/ActivityThread(22977): <<< done: 110
01-28 18:22:23.509: E/ActivityThread(22977): >>> handling: 100
01-28 18:22:23.519: D/AndroidRuntime(22977): Shutting down VM
01-28 18:22:23.519: W/dalvikvm(22977): threadid=1: thread exiting with uncaught exception (group=0x2aac4560)
01-28 18:22:23.529: E/AndroidRuntime(22977): FATAL EXCEPTION: main
01-28 18:22:23.529: E/AndroidRuntime(22977): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tutorialgooglemaps/com.example.tutorialgooglemaps.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1745)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1761)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.ActivityThread.access$1500(ActivityThread.java:124)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:947)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.os.Looper.loop(Looper.java:130)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.ActivityThread.main(ActivityThread.java:3822)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at java.lang.reflect.Method.invokeNative(Native Method)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at java.lang.reflect.Method.invoke(Method.java:507)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at dalvik.system.NativeStart.main(Native Method)
01-28 18:22:23.529: E/AndroidRuntime(22977): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:209)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.Activity.setContentView(Activity.java:1657)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at com.example.tutorialgooglemaps.MainActivity.onCreate(MainActivity.java:11)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1709)
01-28 18:22:23.529: E/AndroidRuntime(22977):    ... 11 more
01-28 18:22:23.529: E/AndroidRuntime(22977): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.example.tutorialgooglemaps-2.apk]
01-28 18:22:23.529: E/AndroidRuntime(22977):    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.createView(LayoutInflater.java:471)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:549)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
01-28 18:22:23.529: E/AndroidRuntime(22977):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
01-28 18:22:23.529: E/AndroidRuntime(22977):    ... 20 more
  • 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-18T03:03:49+00:00Added an answer on June 18, 2026 at 3:03 am

    If anyone had the same problem, the problem is at the activity_main.xml where a LinearLayout or RelativeLayout is needed. Thanks to everyone

    activity_main.xml

    <?xml version="1.0" encoding="utf-8"?>
    
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >
    
    
    <fragment xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.SupportMapFragment" />
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just downloaded the android sdk from the adnroid site and followed this tutorial
I have followed this tutorial: http://blog.patrickcrosby.com/2010/04/27/iphone-ipad-uisearchbar-uisearchdisplaycontroller-asynchronous-example.html In order to get my UISearchBar with SearchDisplayController.
I've just followed this excellent tutorial: http://www.rominirani.com/2009/10/31/episode-6-handling-incoming-email-in-your-application/ And I think my app is working.
http://www.devx.com/wireless/Article/39101/0/page/2 I have followed this tutorial and got it to work and everything. now
To begin with, I followed this tutorial: http://www.codeproject.com/Articles/102065/Android-A-beginner-s-guide?fid=1583614&df=90&mpp=10&noise=1&prof=True&sort=Position&view=Expanded&spc=None&fr=11#xx0xx I have checked a good many
I realized today that I have blindly just followed this requirement for years without
I followed this tutorial to setup SVN on my Fedora box http://www.ashishkulkarni.com/installing-subversion-on-fedora-linux/ It worked.
i've followed the pagination tutorial from http://framework.zend.com/manual/en/zend.paginator.usage.html I have successfully implemented pagination for my
I have followed the tutorial at: http://www.15seconds.com/issue/040331.htm for making a BHO, however i doesnt
Hello I have tried this many different ways and have followed the tutorial at

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.