bitmap size for background image problem in android for samsung galaxy tab -


possible duplicate:
java.lang.outofmemoryerror: bitmap size exceeds vm budget

hi frineds putting background image layout in android while putting bacground , giving fillparent layout.i getting below exception can tell how avoid this

04-11 21:47:36.435: error/androidruntime(316): fatal exception: main 04-11 21:47:36.435: error/androidruntime(316): java.lang.runtimeexception: unable start activity componentinfo{com.gcm/com.gcm.myprofileactivity}: android.view.inflateexception: binary xml file line #10: error inflating class android.widget.tablelayout 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.activitythread.performlaunchactivity(activitythread.java:2663) 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.activitythread.handlelaunchactivity(activitythread.java:2679) 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.activitythread.access$2300(activitythread.java:125) 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.activitythread$h.handlemessage(activitythread.java:2033) 04-11 21:47:36.435: error/androidruntime(316):     @ android.os.handler.dispatchmessage(handler.java:99) 04-11 21:47:36.435: error/androidruntime(316):     @ android.os.looper.loop(looper.java:123) 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.activitythread.main(activitythread.java:4627) 04-11 21:47:36.435: error/androidruntime(316):     @ java.lang.reflect.method.invokenative(native method) 04-11 21:47:36.435: error/androidruntime(316):     @ java.lang.reflect.method.invoke(method.java:521) 04-11 21:47:36.435: error/androidruntime(316):     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:868) 04-11 21:47:36.435: error/androidruntime(316):     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:626) 04-11 21:47:36.435: error/androidruntime(316):     @ dalvik.system.nativestart.main(native method) 04-11 21:47:36.435: error/androidruntime(316): caused by: android.view.inflateexception: binary xml file line #10: error inflating class android.widget.tablelayout 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.layoutinflater.createview(layoutinflater.java:513) 04-11 21:47:36.435: error/androidruntime(316):     @ com.android.internal.policy.impl.phonelayoutinflater.oncreateview(phonelayoutinflater.java:56) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:563) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.layoutinflater.rinflate(layoutinflater.java:618) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.layoutinflater.inflate(layoutinflater.java:407) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.layoutinflater.inflate(layoutinflater.java:320) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.layoutinflater.inflate(layoutinflater.java:276) 04-11 21:47:36.435: error/androidruntime(316):     @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:198) 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.activity.setcontentview(activity.java:1647) 04-11 21:47:36.435: error/androidruntime(316):     @ com.gcm.myprofileactivity.oncreate(myprofileactivity.java:12) 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1047) 04-11 21:47:36.435: error/androidruntime(316):     @ android.app.activitythread.performlaunchactivity(activitythread.java:2627) 04-11 21:47:36.435: error/androidruntime(316):     ... 11 more 04-11 21:47:36.435: error/androidruntime(316): caused by: java.lang.reflect.invocationtargetexception 04-11 21:47:36.435: error/androidruntime(316):     @ android.widget.tablelayout.<init>(tablelayout.java:102) 04-11 21:47:36.435: error/androidruntime(316):     @ java.lang.reflect.constructor.constructnative(native method) 04-11 21:47:36.435: error/androidruntime(316):     @ java.lang.reflect.constructor.newinstance(constructor.java:446) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.layoutinflater.createview(layoutinflater.java:500) 04-11 21:47:36.435: error/androidruntime(316):     ... 22 more 04-11 21:47:36.435: error/androidruntime(316): caused by: java.lang.outofmemoryerror: bitmap size exceeds vm budget 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.bitmap.nativecreate(native method) 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.bitmap.createbitmap(bitmap.java:468) 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.bitmap.createbitmap(bitmap.java:435) 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.bitmap.createscaledbitmap(bitmap.java:340) 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.bitmapfactory.finishdecode(bitmapfactory.java:488) 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.bitmapfactory.decodestream(bitmapfactory.java:462) 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.bitmapfactory.decoderesourcestream(bitmapfactory.java:323) 04-11 21:47:36.435: error/androidruntime(316):     @ android.graphics.drawable.drawable.createfromresourcestream(drawable.java:697) 04-11 21:47:36.435: error/androidruntime(316):     @ android.content.res.resources.loaddrawable(resources.java:1709) 04-11 21:47:36.435: error/androidruntime(316):     @ android.content.res.typedarray.getdrawable(typedarray.java:601) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.view.<init>(view.java:1885) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.view.<init>(view.java:1834) 04-11 21:47:36.435: error/androidruntime(316):     @ android.view.viewgroup.<init>(viewgroup.java:285) 04-11 21:47:36.435: error/androidruntime(316):     @ android.widget.linearlayout.<init>(linearlayout.java:115) 

your app running out of memory due size of bitmap allocation. check out outofmemory exception when loading bitmap external storage , others on setting insamplesize option.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -