I don't have the link right now but I read somewhere that if you want to allocate more memory (especially for images) you can just allocate them as opengl textures as those don't count as heap memory.
I'll try to find the link and get some more detailed info to you. 2011/11/24 Johan Rydenstam <[email protected]> > Are you using different resources for the tablet (like hdpi?). > > I would check for memory leaks. There are tools you can use for this ( Eclipse > memory analyzer) > > On Nov 24, 2011, at 9:51 AM, bob wrote: > > OutOfMemoryError > > I'm getting this OutOfMemoryError: > > 11-24 00:38:10.925: ERROR/dalvikvm-heap(1782): 1440000-byte external > allocation too large for this process. > 11-24 00:38:10.965: ERROR/GraphicsJNI(1782): VM won't let us allocate > 1440000 bytes > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): FATAL EXCEPTION: main > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): > java.lang.OutOfMemoryError: bitmap size exceeds VM budget > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:447) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:520) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > com.youniversalideas.rockyartue.MyApp.getBitmap(MyApp.java:1047) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > com.youniversalideas.rockyartue.MyApp.loadImages(MyApp.java:1217) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > com.youniversalideas.rockyartue.Panel.onDraw(Panel.java:906) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.View.draw(View.java:6880) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewGroup.drawChild(ViewGroup.java:1646) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewGroup.drawChild(ViewGroup.java:1644) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.View.draw(View.java:6883) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.widget.FrameLayout.draw(FrameLayout.java:363) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewGroup.drawChild(ViewGroup.java:1646) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.View.draw(View.java:6883) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.widget.FrameLayout.draw(FrameLayout.java:363) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > com.android.internal.policy.impl.PhoneWindow > $DecorView.draw(PhoneWindow.java:1862) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewRoot.draw(ViewRoot.java:1522) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewRoot.performTraversals(ViewRoot.java:1258) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.view.ViewRoot.handleMessage(ViewRoot.java:1859) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.os.Handler.dispatchMessage(Handler.java:99) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.os.Looper.loop(Looper.java:123) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > android.app.ActivityThread.main(ActivityThread.java:3647) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > java.lang.reflect.Method.invokeNative(Native Method) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > java.lang.reflect.Method.invoke(Method.java:507) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > com.android.internal.os.ZygoteInit > $MethodAndArgsCaller.run(ZygoteInit.java:839) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) > 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at > dalvik.system.NativeStart.main(Native Method) > > Is there any easy way around this, or do I just have to use less > memory? This game works fine on my phone, but strangely the error > shows up on my tablet. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > 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 post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 株式会社アルゴ ARGO Inc. 〒130-0012 東京都墨田区太平3-11-10 NTKオオノビル8階 ソアレス フランシスコ ( Soares Francisco ) Mail : [email protected] HP : http://www.argo.bz/ TEL:03-5619-4511 FAX:03-5619-4512 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

