0

Estou desenvolvendo um app usando o API 14 e uso meu próprio celular (MOTO G5 plus rodando Android 7.0) e funciona muito bem, mas ao usar um outro telefone (GALAXY S5 rodando Android 5.0) ele não abre e aparece essa mensagem no monitor do Android studio:

10-09 11:44:19.054 28206-28206/lcorp.com.temonibus D/AndroidRuntime: Shutting down VM
10-09 11:44:19.074 28206-28206/lcorp.com.temonibus E/AndroidRuntime: FATAL EXCEPTION: main
                                                                     Process: lcorp.com.temonibus, PID: 28206
                                                                     java.lang.OutOfMemoryError: Failed to allocate a 101254116 byte allocation with 16772688 free bytes and 51MB until OOM
                                                                         at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
                                                                         at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
                                                                         at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856)
                                                                         at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675)
                                                                         at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:2228)
                                                                         at android.content.res.Resources.loadDrawableForCookie(Resources.java:4211)
                                                                         at android.content.res.Resources.loadDrawable(Resources.java:4085)
                                                                         at android.content.res.Resources.loadDrawable(Resources.java:3935)
                                                                         at android.content.res.TypedArray.getDrawable(TypedArray.java:886)
                                                                         at android.view.View.<init>(View.java:4225)
                                                                         at android.widget.ImageView.<init>(ImageView.java:150)
                                                                         at android.widget.ImageButton.<init>(ImageButton.java:85)
                                                                         at android.widget.ImageButton.<init>(ImageButton.java:81)
                                                                         at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:57)
                                                                         at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:53)
                                                                         at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:118)
                                                                         at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1013)
                                                                         at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1072)
                                                                         at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
                                                                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:758)
                                                                         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
                                                                         at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
                                                                         at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
                                                                         at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
                                                                         at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
                                                                         at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
                                                                         at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
                                                                         at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
                                                                         at lcorp.com.temonibus.TelaInicial.onCreate(TelaInicial.java:22)
                                                                         at android.app.Activity.performCreate(Activity.java:6876)
                                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
                                                                         at android.app.ActivityThread.access$1100(ActivityThread.java:221)
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                         at android.os.Looper.loop(Looper.java:158)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:7224)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
1

1 Resposta 1

0

Está escrito na mensagem de erro

FATAL EXCEPTION: main Process: 
lcorp.com.temonibus, 
PID: 28206 java.lang.OutOfMemoryError: 
Failed to allocate a 101254116 byte allocation with 16772688 free bytes and 51MB until OOM 
at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at 

Veja como está o consumo de memória.

3

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .