La aplicación se cierra muy a menudo


#1

Buenas, quería preguntarles si saben porque se me cierra tanto mi aplicación con este error:
java.lang.OutOfMemoryError
com.google.appinventor.components.runtime.util.MediaUtil$3.run

Gracias


#2

@juanvalerob do you have lots of images? What’s the largest image size?


#3

Tengo unas 60 imagenes y la mas grande es de 500x465 pixels


#4

How many screens do you have?


#5

Tengo 10 pantallas con muchos bloques cada una, unos 3000 por pantalla


#6

how many images do you display at the same time? you might want to reduce this number

also switch screens correctly…
The recommended method of switching screens in App Inventor
Taifun


#7

Esto me sale en el error:

java.lang.OutOfMemoryError:
at dalvik.system.VMRuntime.newNonMovableArray (Native Method)
at android.graphics.Bitmap.nativeCreate (Native Method)
at android.graphics.Bitmap.createBitmap (Bitmap.java:975)
at android.graphics.Bitmap.createBitmap (Bitmap.java:946)
at android.graphics.Bitmap.createBitmap (Bitmap.java:877)
at android.graphics.Bitmap.createScaledBitmap (Bitmap.java:753)
at com.google.appinventor.components.runtime.util.MediaUtil$3.run (MediaUtil.java:529)
at java.lang.Thread.run (Thread.java:818)


#8

you get an out of memory error mostly of the following 2 reasons:

  1. you do not switch screens correctly
  2. you display too much images at the same time and/or your image dimensions are too large

see tip 1 and 2 here


Taifun