How to thoroughly test an Android app?

-1

I am learning about the development of apps in Android Studio and I have some applications uploaded to Google Play, where they present some blocks in some devices.

For example I am aware that in the Samsung Galaxy S6 and S6 Edge this error jumps me

  

java.lang.RuntimeException:     at android.view.DisplayListCanvas.throwIfCannotDraw (DisplayListCanvas.java:260)     at android.graphics.Canvas.drawBitmap (Canvas.java:1420)     at android.graphics.drawable.BitmapDrawable.draw (BitmapDrawable.java:545)

The problem is that I do not know at what exact moment this error jumps, and I can not fix it, so I would like to be able to test myself with the device that has errors and debugger these errors, since in the emulators that I have configured do not occur to me.

Any solution?

    
asked by Macia Estela 05.10.2018 в 23:42
source

1 answer

0

Catching that kind of errors can be complicated, I usually do unitTest to the logic and services that the app consumes, I also add firebase crashlytics that helps a lot because it gives you enough data to catch the error. Finally when I have this kind of problems in prod, I look in the code that could be causing and investigating.

This error that you raise more specifically may be due to the fact that some image is trying to resize to a very large size and due to memory issues it explodes.

If you have a very large image, for example a full-screen splash, make sure there is a folder res/xhdpi and res/xxhdpi containing a version already adjusted to each size. This way it does not have to resize in memory if it is the case.

Finally look for a similar device and test it well.

    
answered by 06.10.2018 / 00:22
source