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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:46:58+00:00 2026-05-23T03:46:58+00:00

I’m going through the documentation at Hello, MapView to add a MapView to my

  • 0

I’m going through the documentation at Hello, MapView to add a MapView to my Activity.

When I launch my Activity, I get an inflation error on the MapView.

Here is the MapView in my layout xml:

<com.google.android.maps.MapView
    android:id="@+id/mymap"
    android:layout_width="fill_parent"
    android:layout_height="200dip"
    android:clickable="true"
    android:apiKey="withheld"
    />

Here is the code in my MapActivity (the class is named ActivityDetails and extends MapActivity) class:

    MapView mMap;
    mMap = (MapView) findViewById(R.id.mymap);
    mMap.setBuiltInZoomControls(true);

Here is the error:

06-10 09:15:24.277: ERROR/AndroidRuntime(228): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.app/com.my.app.activity.ActivityDetails}: android.view.InflateException: Binary XML file line #35: Error inflating class com.google.android.maps.MapView
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.os.Looper.loop(Looper.java:123)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.ActivityThread.main(ActivityThread.java:4363)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at java.lang.reflect.Method.invokeNative(Native Method)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at java.lang.reflect.Method.invoke(Method.java:521)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at dalvik.system.NativeStart.main(Native Method)
06-10 09:15:24.277: ERROR/AndroidRuntime(228): Caused by: android.view.InflateException: Binary XML file line #35: Error inflating class com.google.android.maps.MapView
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.createView(LayoutInflater.java:513)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.Activity.setContentView(Activity.java:1622)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.my.app.activity.ActivityDetails.onCreate(ActivityDetails.java:128)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     ... 11 more
06-10 09:15:24.277: ERROR/AndroidRuntime(228): Caused by: java.lang.reflect.InvocationTargetException
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.google.android.maps.MapView.<init>(MapView.java:237)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at java.lang.reflect.Constructor.constructNative(Native Method)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at android.view.LayoutInflater.createView(LayoutInflater.java:500)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     ... 23 more
06-10 09:15:24.277: ERROR/AndroidRuntime(228): Caused by: java.lang.NullPointerException
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:183)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.google.android.maps.MapView.<init>(MapView.java:279)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     at com.google.android.maps.MapView.<init>(MapView.java:254)
06-10 09:15:24.277: ERROR/AndroidRuntime(228):     ... 27 more

As far as I can tell, I’ve done everything correct as described in the documentation. I’ve set my build target to Google APIs, I’ve added the uses-library tag to my Manifest, I’m running in an emulator with the Google API target…

  • 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-23T03:46:59+00:00Added an answer on May 23, 2026 at 3:46 am

    The problem was I was calling super.onCreate() after setContentView() in the MapActivity.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Specifically, suppose I start with the string string =hello \'i am \' me And
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an XML file, the creators of it stuck in a bunch social
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to loop through a bunch of documents I have to put
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.