Hi,
On Oct 1, 4:07 pm, Mika <[email protected]> wrote:
> From the stack trace it seems that your trying to allocate 160 MB of
> memory. And for one app the max heap size in Android is 16 Mb (if i
> remember correctly). That's why the outofmemoryerror. Don't know why
> are you allocating that much memory though??
i don't know it, too. Perhaps it helped, if i show you my xml file:
<?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="wrap_content">
<TextView
android:id="@+id/ak"
android:text="Streckenlänge: 0 km"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="15px"
android:layout_marginLeft="5px"
/>
<View
android:id="@+id/view1"
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#FF00FF00"
android:layout_below="@id/ak"
android:layout_marginTop="5px"/>
<TextView
android:id="@+id/ab"
android:text="Abbiegepunkt hinzufügen:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/view1"
android:layout_marginLeft="5px"
android:layout_marginTop="10px"
/>
<Button
android:id="@+id/left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/left"
android:layout_below="@id/ab"
android:layout_alignLeft="@id/ab"
android:layout_marginLeft="5px"
android:layout_marginTop="5px"/>
<Button
android:id="@+id/right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5px"
android:layout_toRightOf="@id/left"
android:layout_alignTop="@id/left"
android:background="@drawable/right"
/>
<View
android:id="@+id/view2"
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#FF00FF00"
android:layout_below="@id/left"
android:layout_marginTop="5px"/>
<TextView
android:id="@+id/gefahr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/view2"
android:text="Gefahrenpunkt:"
android:layout_marginLeft="5px"
android:layout_marginTop="10px"/>
<Button
android:id="@+id/gefahrbild"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="mit Bild speichern"
android:layout_below="@id/gefahr"
android:layout_marginLeft="5px"
android:layout_marginTop="5px"
/>
<Button
android:id="@+id/gefahrtext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="mit Text speichern"
android:layout_toRightOf="@id/gefahrbild"
android:layout_alignTop="@id/gefahrbild"
android:layout_marginLeft="5px"
/>
<View
android:id="@+id/view3"
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#FF00FF00"
android:layout_below="@id/gefahrbild"
android:layout_marginTop="5px"/>
<Button
android:id="@+id/end"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Erfassung stoppen"
android:layout_below="@id/view3"
android:layout_marginLeft="5px"
android:layout_marginTop="10px"
/>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/end">
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:clickable="true"
android:apiKey="api key" />
</RelativeLayout>
</RelativeLayout>
The picture on my buttons are very small and so i thought, the MapView
is the problem?? I dont have an Overlay or something like that.
In my app, i have a locationListener, which "collect" gps points...
And in my app i can start an intent, where i can take pictures.
So I don't know, why i allocate 160 MB?!
Thanks,
Stefan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---