Tuesday, March 5, 2013

[android-developers] Re: InflateException: Error inflating class issue

i am getting the same error just copy the drawable to hdpi,ldpi,mdpi folders it works for two three images after that i am getting same android .inflation error.

On Monday, October 3, 2011 5:16:25 PM UTC+5:30, Tonez wrote:
Hi Everyone,

I have an app which I'm testing out on Android 2.0 (emulator) that's
currently throwing me an error - of which I've found the cause.  The
error is:

android.view.InflateException: Binary XML file line #7: Error
inflating class <unknown>

This error is being thrown when my activity tries to inflate a layout
file with background images in it.  If I remove the background images
from the elements within that layout file, I don't get the error
anymore and my layout file get's loaded into view - only without the
artwork ofcourse.  I've googled around and have found other instances
of this error being caused by the size of the images used being too
large.  My background images aren't large at all, kb sizes are as
follows for the largest background image in that layout file:

hdpi:  102kb
mdpi:  66.2kb
ldpi:  66.2kb

I have three other images in the layout file that don't exceed 14kb in
size.  I've tried removing the largest image in the layout file to see
if the others which are a lot less in size would still cause this
error to be thrown and unfortunately it does.

Worth mentioning that I don't have this problem on Android 2.0.1 and
above, and all my images are pngs.

Any suggestions would be very much appreciated.

Thanks!

- Tonez

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment