java.lang.OutOfMemoryError: Failed to allocate a 2560012 byte allocation
with 1668568 free bytes and 1629KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:609)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1080)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2635)
at android.content.res.Resources.loadDrawable(Resources.java:2540)
在我的平板電腦上完美運行,但在模擬器上出現此錯誤。有任何想法嗎?java.lang.OutOfMemoryError,應用程序無法在模擬器上運行
我曾嘗試加入
android:largeHeap="true"
的清單,但它是一個沒有去。
分享代碼。 – Pehlaj
沒有代碼,只是一大堆xml上的可繪製對象 –
請確保可繪製對象的質量不高 – Pehlaj