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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:25:11+00:00 2026-05-25T22:25:11+00:00

I am, using nearly 90 very big images,and i am using lazy loading for

  • 0

I am, using nearly 90 very big images,and i am using lazy loading for displaying that images in Gallery,and grid view.so after loading the images ,if you click on any button,it giving outofmemory(oom) error,and sometimes it giving Xml binary inflate exception.

I am using very big images,equal to tablet size images,and my apk size is 25MB,.and i am using single activity with multiple FrameLayouts but before loading new View I am removing current view but still problem is there,I dont know why it is happening ?Its giving the oom error but its not giving the exact location of error,and its giving error at random position and error coming frequently.

09-30 15:23:07.490: ERROR/AndroidRuntime(5527): FATAL EXCEPTION: main
09-30 15:23:07.490: ERROR/AndroidRuntime(5527): android.view.InflateException: Binary XML file line #13: Error inflating class <unknown>
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.LayoutInflater.createView(LayoutInflater.java:596)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:644)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at com.maheshbabu.app.JustIn.initialize(JustIn.java:143)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at com.maheshbabu.app.JustIn.<init>(JustIn.java:135)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at com.maheshbabu.app.MaheshBabuHomePage.showLatestPage(MaheshBabuHomePage.java:671)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at com.maheshbabu.app.MaheshBabuHomePage.onClick(MaheshBabuHomePage.java:363)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.View.performClick(View.java:3110)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.View$PerformClick.run(View.java:11934)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.os.Handler.handleCallback(Handler.java:587)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.os.Handler.dispatchMessage(Handler.java:92)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.os.Looper.loop(Looper.java:132)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.app.ActivityThread.main(ActivityThread.java:4123)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at java.lang.reflect.Method.invokeNative(Native Method)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at java.lang.reflect.Method.invoke(Method.java:491)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at dalvik.system.NativeStart.main(Native Method)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527): Caused by: java.lang.reflect.InvocationTargetException
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at java.lang.reflect.Constructor.constructNative(Native Method)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at java.lang.reflect.Constructor.newInstance(Constructor.java:416)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.LayoutInflater.createView(LayoutInflater.java:576)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     ... 21 more
09-30 15:23:07.490: ERROR/AndroidRuntime(5527): Caused by: java.lang.OutOfMemoryError
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:483)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:738)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.content.res.Resources.loadDrawable(Resources.java:1918)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.View.<init>(View.java:2450)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.View.<init>(View.java:2389)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.view.ViewGroup.<init>(ViewGroup.java:359)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     at android.widget.RelativeLayout.<init>(RelativeLayout.java:173)
09-30 15:23:07.490: ERROR/AndroidRuntime(5527):     ... 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-25T22:25:13+00:00Added an answer on May 25, 2026 at 10:25 pm

    I think this exception is comming from

    setContentView(R.layout.main);
    

    line this may be because of various reasons.

    1) Because you are changing your screen orientation from potrait to landscape and vice versa

    Sol) Fix your view to any one orientation. Actually on orientation change new views and new objects are created along with old view and object . thus taking your memory

    2) Objects are not freed

    sol) Removing views will not solve your problem you have to free all the objects related to those views. Call Bitmap.recycle() on every image related to those views.

    also check out these links which may be helpful to you

    How to get rid of out of memory exception

    Check out this video which may be very useful for you

    Memory management for Android Apps

    Happy coding friend

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

Sidebar

Related Questions

I have done a very simple gallery using: $('#thumbs img').click(function(){ $('#mainimg img').attr('src',$(this).attr('src').replace('thumb','large')); }); but
My CF application has a very customized UI, using lots of images as UI
I am using a SimpleMappingExceptionResolver that sends all exceptions to an view where it
Using SQLite I need to copy nearly all of an existing row from a
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C#, I need a class called User that has a username, password, active
Until now I'm using a SoftReference Cache for images in Android. This cache is
I'm using Json.NET to output a notepad-readable JSON file. The output is nearly perfect,
I'm running a camera acquisition program that performs processing on acquired images, and I'm

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.