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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:52:04+00:00 2026-05-23T20:52:04+00:00

I am getting the following random Exception when running this Activity. I found another

  • 0

I am getting the following random Exception when running this Activity. I found another thread here on SO suggesting that all of my styles inherit from parent=”android:Theme” but that did not help. I have run HierarchyViewer and layoutopt tools but have not found any problems with the layout file. And I have cleaned the project.

The exception is happening on the line:

ReceiptActivity.java:54 setContentView(R.layout.receipt_activity);

Here is the layout file, receipt_activity.xml:

<?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"
android:orientation="vertical" 
android:background="@drawable/background">        
<LinearLayout android:layout_width="fill_parent"
    android:paddingLeft="10dip"
    android:paddingRight="10dip"
    android:layout_height="wrap_content" android:orientation="vertical">
        <TextView android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:layout_marginLeft="3dip"
        android:layout_marginRight="3dip"
        android:layout_marginTop="10dip"
        android:textSize="19sp"
        android:text="@string/receipt_question"
        android:gravity="center"/>

         <EditText
        android:id="@+id/txtEmailOrSms"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dip"
        android:layout_marginLeft="3dip"
        android:layout_marginRight="3dip"            
        android:textSize="15sp"
        android:maxLines="1"            
        android:layout_gravity="left" 
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:inputType="textEmailAddress"
        android:hint="@string/enter_email"
        android:imeOptions="actionDone"             
        />

        <RadioGroup
        android:id="@+id/receiptTypeRadioGroup"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical">
            <RadioButton
            android:id="@+id/emailReceipt"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Email Receipt"
            android:textSize="15sp"
            android:checked="true"
            android:width="150dip"
            android:layout_marginRight="5dip"
            android:textColor="#FFF"
            >
            </RadioButton>

            <RadioButton
            android:id="@+id/smsReceipt"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Text Receipt"
            android:textSize="15sp" 
            android:width="150dip" 
            android:layout_marginRight="5dip"             
            android:textColor="#FFF"
            >
            </RadioButton>
        </RadioGroup>

</LinearLayout>
<LinearLayout android:id="@+id/footer" 
    android:layout_width="fill_parent"
    android:layout_height="60dip"
    android:background="@drawable/button_bar_background"
    android:orientation="horizontal"
    android:gravity="bottom"
    android:layout_alignParentBottom="true" 
    style="@android:style/ButtonBar">
    <Button
        android:id="@+id/noThanksBtn"
        android:layout_height="fill_parent"
        android:layout_width="0dip"
        android:layout_weight="1"
        android:layout_marginLeft="1dip"
        style="@style/DarkButton"
        android:text="@string/no_thanks"/>
           <Button
        android:id="@+id/sendReceiptBtn"
        android:layout_height="fill_parent"
        android:layout_width="0dip"
        android:layout_weight="1"
        android:layout_marginRight="1dip"
        style="@style/DarkButton"
        android:text="@string/send_receipt"/>     
</LinearLayout>         
</RelativeLayout>

Here is the Exception:

    07-11 07:08:01.040: ERROR/AndroidRuntime(15635): FATAL EXCEPTION: main
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bestfitmobile.netsecure/com.bestfitmobile.netsecure.ui.ReceiptActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.os.Handler.dispatchMessage(Handler.java:99)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.os.Looper.loop(Looper.java:130)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.ActivityThread.main(ActivityThread.java:3683)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at java.lang.reflect.Method.invokeNative(Native Method)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at java.lang.reflect.Method.invoke(Method.java:507)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at dalvik.system.NativeStart.main(Native Method)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.LayoutInflater.createView(LayoutInflater.java:518)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.Activity.setContentView(Activity.java:1657)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at com.bestfitmobile.netsecure.ui.ReceiptActivity.onCreate(ReceiptActivity.java:54)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     ... 11 more
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635): Caused by: java.lang.reflect.InvocationTargetException
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at java.lang.reflect.Constructor.constructNative(Native Method)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.LayoutInflater.createView(LayoutInflater.java:505)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     ... 21 more
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.content.res.Resources.loadDrawable(Resources.java:1709)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.View.<init>(View.java:1951)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.View.<init>(View.java:1899)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.view.ViewGroup.<init>(ViewGroup.java:286)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     at android.widget.RelativeLayout.<init>(RelativeLayout.java:173)
    07-11 07:08:01.040: ERROR/AndroidRuntime(15635):     ... 24 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-05-23T20:52:04+00:00Added an answer on May 23, 2026 at 8:52 pm

    The answer is here:

    07-11 07:08:01.040: ERROR/AndroidRuntime(15635): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
    

    The drawable called background is too large. If you remove that it should load fine. Not sure how big that can be, but evidently you used an image too large.

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

Sidebar

Related Questions

I am getting Following Exception while configuring the Connection Pool in Tomcat This is
Following is the function which provide random string... but i'm getting this error message
I am getting random row from my table using the following query: SELECT value_id
Am getting following error message on calling WCF service: The formatter threw an exception
i am getting following memory leaks for webview initWebUILocalStorageSupport MobileQuickLookLibrary() and here is my
In the MonoTouch simulator I am getting random crashes with the following diagnostic: /tmp/mono-gdb-commands.FV1b8V:1:
We're getting the following error on random page loads: Error compiling CSS asset Encoding::ConverterNotFoundError:
I am getting following error when I am trying to get WebResponse using WebResponse
I am getting following error message when using Doctrine ORM in Codeigniter. ( !
SOLVED in the last answer im getting following error, dunno where and why? cause

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.