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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:17:32+00:00 2026-06-14T18:17:32+00:00

Possible Duplicate: Android: error inflating xml: class unknown My app crashes when it’s to

  • 0

Possible Duplicate:
Android: error inflating xml: class unknown

My app crashes when it’s to inflate this layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1" >

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="match_parent" >

            <Button
                android:id="@+id/btnSurvey"
                android:layout_width="80dip"
                android:layout_height="80dip"
                android:layout_centerInParent="true"
                android:background="@drawable/myschedulechanges_icon"
                android:onClick="openSurvey" />

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/btnSurvey"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="3dip"
                android:text="Mijn\nroosterwijzigingen" />

        </RelativeLayout>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1" >

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_weight="1" >

            <Button
                android:id="@+id/btnAutomaticCheck"
                android:layout_width="80dip"
                android:layout_height="80dip"
                android:layout_centerInParent="true"
                android:background="@drawable/automaticcheck_icon"
                android:onClick="openAutomaticCheck" />

            <TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/btnAutomaticCheck"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="3dip"
                android:text="Automatisch\nchecken" />

        </RelativeLayout>

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_weight="1" >

            <Button
                android:id="@+id/btnManualCheck"
                android:layout_width="80dip"
                android:layout_height="80dip"
                android:layout_centerInParent="true"
                android:background="@drawable/manualcheck_icon"
                android:onClick="openManualCheck" />

            <TextView
                android:id="@+id/textView3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/btnManualCheck"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="3dip"
                android:text="Handmatig\nchecken" />

        </RelativeLayout>

    </LinearLayout>

</LinearLayout>

With these error messages:

11-18 09:48:15.713: E/AndroidRuntime(642): FATAL EXCEPTION: main
    11-18 09:48:15.713: E/AndroidRuntime(642): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.camelotapps.augustinianum/com.camelotapps.augustinianum.ScheduleChangesActivity}: android.view.InflateException: Binary XML file line #46: Error inflating class <unknown>
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.os.Handler.dispatchMessage(Handler.java:99)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.os.Looper.loop(Looper.java:137)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.ActivityThread.main(ActivityThread.java:4424)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at java.lang.reflect.Method.invokeNative(Native Method)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at java.lang.reflect.Method.invoke(Method.java:511)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at dalvik.system.NativeStart.main(Native Method)
    11-18 09:48:15.713: E/AndroidRuntime(642): Caused by: android.view.InflateException: Binary XML file line #46: Error inflating class <unknown>
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.createView(LayoutInflater.java:606)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.Activity.setContentView(Activity.java:1835)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at com.camelotapps.augustinianum.ScheduleChangesActivity.onCreate(ScheduleChangesActivity.java:18)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.Activity.performCreate(Activity.java:4465)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
    11-18 09:48:15.713: E/AndroidRuntime(642):  ... 11 more
    11-18 09:48:15.713: E/AndroidRuntime(642): Caused by: java.lang.reflect.InvocationTargetException
    11-18 09:48:15.713: E/AndroidRuntime(642):  at java.lang.reflect.Constructor.constructNative(Native Method)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.LayoutInflater.createView(LayoutInflater.java:586)
    11-18 09:48:15.713: E/AndroidRuntime(642):  ... 26 more
    11-18 09:48:15.713: E/AndroidRuntime(642): Caused by: java.lang.OutOfMemoryError
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.Bitmap.nativeCreate(Native Method)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.Bitmap.createBitmap(Bitmap.java:605)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.Bitmap.createBitmap(Bitmap.java:551)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:524)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:499)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:773)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.content.res.Resources.loadDrawable(Resources.java:1935)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.view.View.<init>(View.java:2785)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.widget.TextView.<init>(TextView.java:449)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.widget.Button.<init>(Button.java:108)
    11-18 09:48:15.713: E/AndroidRuntime(642):  at android.widget.Button.<init>(Button.java:104)
    11-18 09:48:15.713: E/AndroidRuntime(642):  ... 29 more

Line #46 is the first line of this section:

<Button
    android:id="@+id/btnAutomaticCheck"
    android:layout_width="80dip"
    android:layout_height="80dip"
    android:layout_centerInParent="true"
    android:background="@drawable/automaticcheck_icon"
    android:onClick="openAutomaticCheck" />

Why am I getting this OutOfMemoryError?
And, even more important, what can I do to avoid it?

Many thanks in advance!

  • 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-14T18:17:33+00:00Added an answer on June 14, 2026 at 6:17 pm

    I just reduced the size of the button’s backgound a little bit. And it works fine now!

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

Sidebar

Related Questions

Possible Duplicate: key hash for android-facebook app I'm trying to fix the error about
Possible Duplicate: Android Button: set onClick background image change with XML? I need that
Possible Duplicate: Android Layout and positioning issue Design layout which support for all kind
Possible Duplicate: @Override annotation error (android prefs) I have imported a project into my
Possible Duplicate: Android error: Failed to install *.apk on device *: timeout keep getting
Possible Duplicate: Android error - close() was never explicitly called on database I have
Possible Duplicate: R cannot be resolved - Android error The errors I have are
Possible Duplicate: Android Unknown Command 'crunch' I have been using eclipse just fine but
Possible Duplicate: Android CalendarView class cannot be found I tried putting a Date Picker
Possible Duplicate: error is showing for Digital Clock widget Application in Android I want

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.