How to fix out of memory error in Firebase robo test










0















In my half a dozens of physical devices and in emulators the app doesn't crashes, but while testing in Firebase 4/10 devices test failed with:




java.lang.OutOfMemoryError: Failed to allocate a 42465612 byte allocation
with 13253240 free bytes and 12MB until OOM




FATAL EXCEPTION: main
Process: technocrats.com.gymaholic, PID: 24886
java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:587)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:422)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840)
at android.content.res.Resources.loadDrawable(Resources.java:2150)
at android.content.res.Resources.getDrawable(Resources.java:715)
at android.support.v7.widget.ResourcesWrapper.getDrawable(ResourcesWrapper.java:130)
at android.support.v7.widget.TintResources.getDrawable(TintResources.java:46)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:465)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:102)
at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:59)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:79)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:69)
at android.support.v7.app.AppCompatViewInflater.createImageButton(AppCompatViewInflater.java:202)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:122)
at android.support.v7.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1266)
at android.support.v7.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1316)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.access$800(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5118)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)









share|improve this question
























  • I uploaded a debug apk ! Is that the issue?

    – 5NIP3R Xd
    Nov 15 '18 at 8:41











  • This doesn't look like a Firebase issue. Are you loading a large bitmap/drawable from resources? Can you share your code from MainActivity, especially line 57 & the onCreate method (at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57))?

    – Grimthorr
    Nov 15 '18 at 8:50











  • I'm not sure whats the problem all i have in line 57 is setContentView(R.layout.activity_main); and I'm using GIF.@Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 8:58












  • How big is the GIF? The error occurs when loading a large resource file into memory (for an ImageView for example), so you'll need to reduce the size of the image or reduce the number of images. Alternatively, you can enable largeHeap which might help. In the meantime, please edit your question to include all relevant information to create a Minimal, Complete, and Verifiable example, including your code and layout XML so we can formulate an answer.

    – Grimthorr
    Nov 15 '18 at 9:31











  • i have two GIF 12kb and 800kb, I also figured i have 1.6mb image background on 10 layouts @Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 9:54
















0















In my half a dozens of physical devices and in emulators the app doesn't crashes, but while testing in Firebase 4/10 devices test failed with:




java.lang.OutOfMemoryError: Failed to allocate a 42465612 byte allocation
with 13253240 free bytes and 12MB until OOM




FATAL EXCEPTION: main
Process: technocrats.com.gymaholic, PID: 24886
java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:587)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:422)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840)
at android.content.res.Resources.loadDrawable(Resources.java:2150)
at android.content.res.Resources.getDrawable(Resources.java:715)
at android.support.v7.widget.ResourcesWrapper.getDrawable(ResourcesWrapper.java:130)
at android.support.v7.widget.TintResources.getDrawable(TintResources.java:46)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:465)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:102)
at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:59)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:79)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:69)
at android.support.v7.app.AppCompatViewInflater.createImageButton(AppCompatViewInflater.java:202)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:122)
at android.support.v7.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1266)
at android.support.v7.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1316)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.access$800(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5118)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)









share|improve this question
























  • I uploaded a debug apk ! Is that the issue?

    – 5NIP3R Xd
    Nov 15 '18 at 8:41











  • This doesn't look like a Firebase issue. Are you loading a large bitmap/drawable from resources? Can you share your code from MainActivity, especially line 57 & the onCreate method (at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57))?

    – Grimthorr
    Nov 15 '18 at 8:50











  • I'm not sure whats the problem all i have in line 57 is setContentView(R.layout.activity_main); and I'm using GIF.@Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 8:58












  • How big is the GIF? The error occurs when loading a large resource file into memory (for an ImageView for example), so you'll need to reduce the size of the image or reduce the number of images. Alternatively, you can enable largeHeap which might help. In the meantime, please edit your question to include all relevant information to create a Minimal, Complete, and Verifiable example, including your code and layout XML so we can formulate an answer.

    – Grimthorr
    Nov 15 '18 at 9:31











  • i have two GIF 12kb and 800kb, I also figured i have 1.6mb image background on 10 layouts @Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 9:54














0












0








0








In my half a dozens of physical devices and in emulators the app doesn't crashes, but while testing in Firebase 4/10 devices test failed with:




java.lang.OutOfMemoryError: Failed to allocate a 42465612 byte allocation
with 13253240 free bytes and 12MB until OOM




FATAL EXCEPTION: main
Process: technocrats.com.gymaholic, PID: 24886
java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:587)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:422)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840)
at android.content.res.Resources.loadDrawable(Resources.java:2150)
at android.content.res.Resources.getDrawable(Resources.java:715)
at android.support.v7.widget.ResourcesWrapper.getDrawable(ResourcesWrapper.java:130)
at android.support.v7.widget.TintResources.getDrawable(TintResources.java:46)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:465)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:102)
at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:59)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:79)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:69)
at android.support.v7.app.AppCompatViewInflater.createImageButton(AppCompatViewInflater.java:202)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:122)
at android.support.v7.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1266)
at android.support.v7.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1316)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.access$800(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5118)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)









share|improve this question
















In my half a dozens of physical devices and in emulators the app doesn't crashes, but while testing in Firebase 4/10 devices test failed with:




java.lang.OutOfMemoryError: Failed to allocate a 42465612 byte allocation
with 13253240 free bytes and 12MB until OOM




FATAL EXCEPTION: main
Process: technocrats.com.gymaholic, PID: 24886
java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:587)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:422)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840)
at android.content.res.Resources.loadDrawable(Resources.java:2150)
at android.content.res.Resources.getDrawable(Resources.java:715)
at android.support.v7.widget.ResourcesWrapper.getDrawable(ResourcesWrapper.java:130)
at android.support.v7.widget.TintResources.getDrawable(TintResources.java:46)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:465)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:102)
at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:59)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:79)
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:69)
at android.support.v7.app.AppCompatViewInflater.createImageButton(AppCompatViewInflater.java:202)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:122)
at android.support.v7.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1266)
at android.support.v7.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1316)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57)
at android.app.Activity.performCreate(Activity.java:5275)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.access$800(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5118)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)






android firebase firebase-test-lab






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 14:22









Frank van Puffelen

237k29382408




237k29382408










asked Nov 15 '18 at 8:34









5NIP3R Xd5NIP3R Xd

1610




1610












  • I uploaded a debug apk ! Is that the issue?

    – 5NIP3R Xd
    Nov 15 '18 at 8:41











  • This doesn't look like a Firebase issue. Are you loading a large bitmap/drawable from resources? Can you share your code from MainActivity, especially line 57 & the onCreate method (at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57))?

    – Grimthorr
    Nov 15 '18 at 8:50











  • I'm not sure whats the problem all i have in line 57 is setContentView(R.layout.activity_main); and I'm using GIF.@Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 8:58












  • How big is the GIF? The error occurs when loading a large resource file into memory (for an ImageView for example), so you'll need to reduce the size of the image or reduce the number of images. Alternatively, you can enable largeHeap which might help. In the meantime, please edit your question to include all relevant information to create a Minimal, Complete, and Verifiable example, including your code and layout XML so we can formulate an answer.

    – Grimthorr
    Nov 15 '18 at 9:31











  • i have two GIF 12kb and 800kb, I also figured i have 1.6mb image background on 10 layouts @Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 9:54


















  • I uploaded a debug apk ! Is that the issue?

    – 5NIP3R Xd
    Nov 15 '18 at 8:41











  • This doesn't look like a Firebase issue. Are you loading a large bitmap/drawable from resources? Can you share your code from MainActivity, especially line 57 & the onCreate method (at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57))?

    – Grimthorr
    Nov 15 '18 at 8:50











  • I'm not sure whats the problem all i have in line 57 is setContentView(R.layout.activity_main); and I'm using GIF.@Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 8:58












  • How big is the GIF? The error occurs when loading a large resource file into memory (for an ImageView for example), so you'll need to reduce the size of the image or reduce the number of images. Alternatively, you can enable largeHeap which might help. In the meantime, please edit your question to include all relevant information to create a Minimal, Complete, and Verifiable example, including your code and layout XML so we can formulate an answer.

    – Grimthorr
    Nov 15 '18 at 9:31











  • i have two GIF 12kb and 800kb, I also figured i have 1.6mb image background on 10 layouts @Grimthorr

    – 5NIP3R Xd
    Nov 15 '18 at 9:54

















I uploaded a debug apk ! Is that the issue?

– 5NIP3R Xd
Nov 15 '18 at 8:41





I uploaded a debug apk ! Is that the issue?

– 5NIP3R Xd
Nov 15 '18 at 8:41













This doesn't look like a Firebase issue. Are you loading a large bitmap/drawable from resources? Can you share your code from MainActivity, especially line 57 & the onCreate method (at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57))?

– Grimthorr
Nov 15 '18 at 8:50





This doesn't look like a Firebase issue. Are you loading a large bitmap/drawable from resources? Can you share your code from MainActivity, especially line 57 & the onCreate method (at technocrats.com.gymaholic.MainActivity.onCreate(MainActivity.java:57))?

– Grimthorr
Nov 15 '18 at 8:50













I'm not sure whats the problem all i have in line 57 is setContentView(R.layout.activity_main); and I'm using GIF.@Grimthorr

– 5NIP3R Xd
Nov 15 '18 at 8:58






I'm not sure whats the problem all i have in line 57 is setContentView(R.layout.activity_main); and I'm using GIF.@Grimthorr

– 5NIP3R Xd
Nov 15 '18 at 8:58














How big is the GIF? The error occurs when loading a large resource file into memory (for an ImageView for example), so you'll need to reduce the size of the image or reduce the number of images. Alternatively, you can enable largeHeap which might help. In the meantime, please edit your question to include all relevant information to create a Minimal, Complete, and Verifiable example, including your code and layout XML so we can formulate an answer.

– Grimthorr
Nov 15 '18 at 9:31





How big is the GIF? The error occurs when loading a large resource file into memory (for an ImageView for example), so you'll need to reduce the size of the image or reduce the number of images. Alternatively, you can enable largeHeap which might help. In the meantime, please edit your question to include all relevant information to create a Minimal, Complete, and Verifiable example, including your code and layout XML so we can formulate an answer.

– Grimthorr
Nov 15 '18 at 9:31













i have two GIF 12kb and 800kb, I also figured i have 1.6mb image background on 10 layouts @Grimthorr

– 5NIP3R Xd
Nov 15 '18 at 9:54






i have two GIF 12kb and 800kb, I also figured i have 1.6mb image background on 10 layouts @Grimthorr

– 5NIP3R Xd
Nov 15 '18 at 9:54













1 Answer
1






active

oldest

votes


















0














As Christophe already mentioned in the comments, this doesn't look like an issue with Firebase Test Lab. It actually is telling you that you are not making good use of the available device resources.



The error message suggests that your app tries to allocate a 40 MB image, which is definitely way too much.



Try to make your usage of images more reasonable:



  • Use PNGs or VectorDrawables as they give you a better compression ratio than GIF for the same quality

  • If you need animations, try out animated vector drawables.

  • Use other types of drawables like ShapeDrawable or NinePatchDrawable, which are especially useful for backgrounds that need to scale based on device dimensions and screen densities.





share|improve this answer























  • I there any quick fix i have like 70+ images in image view,2 GIF,5 mp3 in RAW folder @maik

    – 5NIP3R Xd
    Nov 16 '18 at 7:16












  • Without more context on how your app works and how it utilizes those images, there's no easy quick fix. Maybe try to understand why you get that error saying that it tries to allocate a 40 MB buffer for an image. As a point of reference: a 32 bit bitmap with width 1024 and height 1024 would take up 4 MB. So, what are you doing that it needs 10 times that amount?

    – maik
    Nov 16 '18 at 8:54










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53315251%2fhow-to-fix-out-of-memory-error-in-firebase-robo-test%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














As Christophe already mentioned in the comments, this doesn't look like an issue with Firebase Test Lab. It actually is telling you that you are not making good use of the available device resources.



The error message suggests that your app tries to allocate a 40 MB image, which is definitely way too much.



Try to make your usage of images more reasonable:



  • Use PNGs or VectorDrawables as they give you a better compression ratio than GIF for the same quality

  • If you need animations, try out animated vector drawables.

  • Use other types of drawables like ShapeDrawable or NinePatchDrawable, which are especially useful for backgrounds that need to scale based on device dimensions and screen densities.





share|improve this answer























  • I there any quick fix i have like 70+ images in image view,2 GIF,5 mp3 in RAW folder @maik

    – 5NIP3R Xd
    Nov 16 '18 at 7:16












  • Without more context on how your app works and how it utilizes those images, there's no easy quick fix. Maybe try to understand why you get that error saying that it tries to allocate a 40 MB buffer for an image. As a point of reference: a 32 bit bitmap with width 1024 and height 1024 would take up 4 MB. So, what are you doing that it needs 10 times that amount?

    – maik
    Nov 16 '18 at 8:54















0














As Christophe already mentioned in the comments, this doesn't look like an issue with Firebase Test Lab. It actually is telling you that you are not making good use of the available device resources.



The error message suggests that your app tries to allocate a 40 MB image, which is definitely way too much.



Try to make your usage of images more reasonable:



  • Use PNGs or VectorDrawables as they give you a better compression ratio than GIF for the same quality

  • If you need animations, try out animated vector drawables.

  • Use other types of drawables like ShapeDrawable or NinePatchDrawable, which are especially useful for backgrounds that need to scale based on device dimensions and screen densities.





share|improve this answer























  • I there any quick fix i have like 70+ images in image view,2 GIF,5 mp3 in RAW folder @maik

    – 5NIP3R Xd
    Nov 16 '18 at 7:16












  • Without more context on how your app works and how it utilizes those images, there's no easy quick fix. Maybe try to understand why you get that error saying that it tries to allocate a 40 MB buffer for an image. As a point of reference: a 32 bit bitmap with width 1024 and height 1024 would take up 4 MB. So, what are you doing that it needs 10 times that amount?

    – maik
    Nov 16 '18 at 8:54













0












0








0







As Christophe already mentioned in the comments, this doesn't look like an issue with Firebase Test Lab. It actually is telling you that you are not making good use of the available device resources.



The error message suggests that your app tries to allocate a 40 MB image, which is definitely way too much.



Try to make your usage of images more reasonable:



  • Use PNGs or VectorDrawables as they give you a better compression ratio than GIF for the same quality

  • If you need animations, try out animated vector drawables.

  • Use other types of drawables like ShapeDrawable or NinePatchDrawable, which are especially useful for backgrounds that need to scale based on device dimensions and screen densities.





share|improve this answer













As Christophe already mentioned in the comments, this doesn't look like an issue with Firebase Test Lab. It actually is telling you that you are not making good use of the available device resources.



The error message suggests that your app tries to allocate a 40 MB image, which is definitely way too much.



Try to make your usage of images more reasonable:



  • Use PNGs or VectorDrawables as they give you a better compression ratio than GIF for the same quality

  • If you need animations, try out animated vector drawables.

  • Use other types of drawables like ShapeDrawable or NinePatchDrawable, which are especially useful for backgrounds that need to scale based on device dimensions and screen densities.






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 16 '18 at 2:18









maikmaik

1,56811225




1,56811225












  • I there any quick fix i have like 70+ images in image view,2 GIF,5 mp3 in RAW folder @maik

    – 5NIP3R Xd
    Nov 16 '18 at 7:16












  • Without more context on how your app works and how it utilizes those images, there's no easy quick fix. Maybe try to understand why you get that error saying that it tries to allocate a 40 MB buffer for an image. As a point of reference: a 32 bit bitmap with width 1024 and height 1024 would take up 4 MB. So, what are you doing that it needs 10 times that amount?

    – maik
    Nov 16 '18 at 8:54

















  • I there any quick fix i have like 70+ images in image view,2 GIF,5 mp3 in RAW folder @maik

    – 5NIP3R Xd
    Nov 16 '18 at 7:16












  • Without more context on how your app works and how it utilizes those images, there's no easy quick fix. Maybe try to understand why you get that error saying that it tries to allocate a 40 MB buffer for an image. As a point of reference: a 32 bit bitmap with width 1024 and height 1024 would take up 4 MB. So, what are you doing that it needs 10 times that amount?

    – maik
    Nov 16 '18 at 8:54
















I there any quick fix i have like 70+ images in image view,2 GIF,5 mp3 in RAW folder @maik

– 5NIP3R Xd
Nov 16 '18 at 7:16






I there any quick fix i have like 70+ images in image view,2 GIF,5 mp3 in RAW folder @maik

– 5NIP3R Xd
Nov 16 '18 at 7:16














Without more context on how your app works and how it utilizes those images, there's no easy quick fix. Maybe try to understand why you get that error saying that it tries to allocate a 40 MB buffer for an image. As a point of reference: a 32 bit bitmap with width 1024 and height 1024 would take up 4 MB. So, what are you doing that it needs 10 times that amount?

– maik
Nov 16 '18 at 8:54





Without more context on how your app works and how it utilizes those images, there's no easy quick fix. Maybe try to understand why you get that error saying that it tries to allocate a 40 MB buffer for an image. As a point of reference: a 32 bit bitmap with width 1024 and height 1024 would take up 4 MB. So, what are you doing that it needs 10 times that amount?

– maik
Nov 16 '18 at 8:54



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53315251%2fhow-to-fix-out-of-memory-error-in-firebase-robo-test%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

Evgeni Malkin