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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:39:06+00:00 2026-05-30T21:39:06+00:00

I am trying to create a MapView (currently without any overlays) inside some nested

  • 0

I am trying to create a MapView (currently without any overlays) inside some nested elements.
It is basically something like ScrollView -> RelativeLayout -> RelativeLayout -> MapView

 <com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="420px"
android:layout_height="300px"
android:clickable="false"
android:apiKey="key"/>

Seems fine for me. There is nothing more that I do with it on startup but it always causes the following:

04-04 13:38:33.910: WARN/dalvikvm(13628): threadid=1: thread exiting with uncaught exception (group=0x40015560)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628): FATAL EXCEPTION: main
04-04 13:38:33.996: ERROR/AndroidRuntime(13628): java.lang.OutOfMemoryError
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android_maps_conflict_avoidance.com.google.googlenav.map.Map.resize(Map.java:1368)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android_maps_conflict_avoidance.com.google.googlenav.map.Map.resize(Map.java:1337)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at com.google.android.maps.MapView.onMeasure(MapView.java:590)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.View.measure(View.java:8313)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:581)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:365)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.View.measure(View.java:8313)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:581)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:365)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.View.measure(View.java:8313)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1072)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.ScrollView.onMeasure(ScrollView.java:296)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.View.measure(View.java:8313)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.View.measure(View.java:8313)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:531)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.View.measure(View.java:8313)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.View.measure(View.java:8313)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.ViewRoot.performTraversals(ViewRoot.java:839)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.os.Looper.loop(Looper.java:123)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at android.app.ActivityThread.main(ActivityThread.java:3647)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at java.lang.reflect.Method.invokeNative(Native Method)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at java.lang.reflect.Method.invoke(Method.java:507)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-04 13:38:33.996: ERROR/AndroidRuntime(13628):     at dalvik.system.NativeStart.main(Native Method)
04-04 13:38:34.027: WARN/ActivityManager(6000):   Force finishing activity package/.home
04-04 13:38:34.527: WARN/ActivityManager(6000): Activity pause timeout for HistoryRecord{405336d0 package/.home}

Do you have any idea why this is and what I can do to get rid of it? I can’t take it out of that view as it is the place where I need it.

Thank you!

  • 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-30T21:39:07+00:00Added an answer on May 30, 2026 at 9:39 pm

    I found out something quite simple.

    Just place the MapView inside a FrameLayout. Let the FramgeLayout be wrap_content | wrap_content and everything is fine 🙂

    This one fails:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    
        <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent">
    
            <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
    
                <view android:layout_width="100dip" android:layout_height="90dip" class="com.google.android.maps.MapView"
                    android:apiKey="@string/API_KEY" android:clickable="true" />
    
            </RelativeLayout>
        </ScrollView>
    </RelativeLayout>
    

    I get the following stacktrace:

    java.lang.OutOfMemoryError
    at com.google.googlenav.map.Map.resize(Unknown Source)
    at com.google.android.maps.MapView.onMeasure(MapView.java:554)
    at android.view.View.measure(View.java:8172)
    at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:578)
    at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:362)
    at android.view.View.measure(View.java:8172)
    at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:989)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
    at android.widget.ScrollView.onMeasure(ScrollView.java:286)
    at android.view.View.measure(View.java:8172)
    at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:578)
    at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:362)
    at android.view.View.measure(View.java:8172)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
    at android.view.View.measure(View.java:8172)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
    at android.view.View.measure(View.java:8172)
    at android.view.ViewRoot.performTraversals(ViewRoot.java:805)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:144)
    at android.app.ActivityThread.main(ActivityThread.java:4937)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    at dalvik.system.NativeStart.main(Native Method)
    

    An here the solution:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    
        <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent">
    
            <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
    
                <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
    
                    <view android:layout_width="100dip" android:layout_height="90dip" class="com.google.android.maps.MapView"
                        android:apiKey="@string/API_KEY" android:clickable="true" />
    
                </FrameLayout>
    
            </RelativeLayout>
        </ScrollView>
    </RelativeLayout>
    

    Greetings,
    Marco

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

Sidebar

Related Questions

I'm trying to create an application that uses the iPhone MapView (under Google Code).
Trying to create several layers of folders at once C:\pie\applepie\recipies\ without using several different
I'm trying create this function such that if any key besides any of the
I'm trying to create a 1x2 TableLayout with MapView in one of the cells.
I am trying create a table and add this table into tablecell (table inside
guys. I'm trying to create MapView, where current location of device shows as pin
I am trying to rotate the MapView. And could rotate it just like this
I am trying to create a Android MapView . In Part 2 of the
I am trying create a WCF service that leverages the WPF MediaPlayer on the
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can

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.