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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:54:21+00:00 2026-06-03T23:54:21+00:00

i have a error on my android project that i cant solve. I have

  • 0

i have a error on my android project that i cant solve.

I have a game menu layout in one xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/RootView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/gamemenu_background"
    android:orientation="vertical" >

    <Button
        android:id="@+id/gaveup_button"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@drawable/gaveup_button">

    </Button>

    <Button
        android:id="@+id/choice_a_button"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@drawable/choice_a_button">   

    </Button>

    <Button
        android:id="@+id/choice_b_button"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@drawable/choice_b_button"/>

</RelativeLayout>

So for each button i have an xml and an image in folder drawable:

choice_a_button_xml.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:drawable="@drawable/choice_a_button"></item>
</selector>

choice_b_button_xml.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:drawable="@drawable/choice_b_button"></item>
</selector>

In layout manager of eclipse de layout are good but when i run the app on a virtual device i have an error and app not start:

05-15 01:22:52.284: D/dalvikvm(341): GC freed 605 objects / 48664 bytes in 166ms
05-15 01:22:52.446: D/dalvikvm(341): GC freed 59 objects / 2304 bytes in 46ms
05-15 01:22:52.814: D/dalvikvm(341): GC freed 138 objects / 6344 bytes in 42ms
05-15 01:22:53.124: D/dalvikvm(341): GC freed 48 objects / 1864 bytes in 44ms
05-15 01:22:53.724: E/dalvikvm-heap(341): 3686400-byte external allocation too large for this process.
05-15 01:22:53.724: E/(341): VM won't let us allocate 3686400 bytes
05-15 01:22:53.724: D/skia(341): --- decoder->decode returned false
05-15 01:22:53.735: D/AndroidRuntime(341): Shutting down VM
05-15 01:22:53.735: W/dalvikvm(341): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
05-15 01:22:53.735: E/AndroidRuntime(341): Uncaught handler: thread main exiting due to uncaught exception
05-15 01:22:53.754: E/AndroidRuntime(341): java.lang.RuntimeException: Unable to start activity ComponentInfo{sal.app/sal.app.SALActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class <unknown>
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.os.Looper.loop(Looper.java:123)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.ActivityThread.main(ActivityThread.java:4363)
05-15 01:22:53.754: E/AndroidRuntime(341):  at java.lang.reflect.Method.invokeNative(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341):  at java.lang.reflect.Method.invoke(Method.java:521)
05-15 01:22:53.754: E/AndroidRuntime(341):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-15 01:22:53.754: E/AndroidRuntime(341):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-15 01:22:53.754: E/AndroidRuntime(341):  at dalvik.system.NativeStart.main(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341): Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class <unknown>
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.LayoutInflater.createView(LayoutInflater.java:513)
05-15 01:22:53.754: E/AndroidRuntime(341):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-15 01:22:53.754: E/AndroidRuntime(341):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.Activity.setContentView(Activity.java:1622)
05-15 01:22:53.754: E/AndroidRuntime(341):  at sal.app.SALActivity.onCreate(SALActivity.java:23)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
05-15 01:22:53.754: E/AndroidRuntime(341):  ... 11 more
05-15 01:22:53.754: E/AndroidRuntime(341): Caused by: java.lang.reflect.InvocationTargetException
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.widget.Button.<init>(Button.java:65)
05-15 01:22:53.754: E/AndroidRuntime(341):  at java.lang.reflect.Constructor.constructNative(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341):  at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.LayoutInflater.createView(LayoutInflater.java:500)
05-15 01:22:53.754: E/AndroidRuntime(341):  ... 22 more
05-15 01:22:53.754: E/AndroidRuntime(341): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:447)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.content.res.Resources.loadDrawable(Resources.java:1705)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.view.View.<init>(View.java:1850)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.widget.TextView.<init>(TextView.java:326)
05-15 01:22:53.754: E/AndroidRuntime(341):  at android.widget.Button.<init>(Button.java:69)
05-15 01:22:53.754: E/AndroidRuntime(341):  ... 26 more
05-15 01:22:53.774: I/dalvikvm(341): threadid=7: reacting to signal 3
05-15 01:22:53.774: E/dalvikvm(341): Unable to open stack trace file '/data/anr/traces.txt': Permission denied

Whats happen there? This error only ocurre in virtual devices with large screens.

This app work if i set Max VM application heap size of my virtual device to 48. But this is too much..There is any way to put program consumes less memory?

please help me

  • 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-03T23:54:23+00:00Added an answer on June 3, 2026 at 11:54 pm

    What @Michaeldcooney said and you should also check for memory leaks. Also, what’s the VM memory size (that’s the size of memory usable by an application, not the device total memory size) for your virtual devices?

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

Sidebar

Related Questions

I have come across a strange error. I have an Android project that uses
Background I have an Android project that has a database with two tables: tbl_question
Okay I have a project that is using the android-rss library (org.mcsoxford.rss). I created
I have an Android Eclipse project that I'd like to divide into two sub-projects.
I have a working Android tuner project app that I want to use as
I have an error with android development. In fact i try to parse a
I have installed the android SDK but I’m getting an error when using a
i have a problem with my Android Application. The Error occures when i want
Hello i have error when i am forwarding page without parameter. that is happen
I experience strange problem. We have error handling in global.asax that would redirect user

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.