I have android app which works fine on my tablet, but it crashes when you load an activity on my phone.
The thing that seems odd to me is the main title page loads without problems when you launch the app, however when I load either the game activity or just the instructions page activity the app will crash.
The title page consists of a background image, and 3 image buttons while the instructions page consists of a background image of the same resolution and 2 out of the 3 same buttons from the title page activity. So it effectively loads less images is what I am getting at, yet it crashes when attempting to load that activity.
Here is the stack trace:
07-25 12:51:14.841 16090-16090/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: bitrump.fishygame, PID: 16090
java.lang.OutOfMemoryError: Failed to allocate a 132710412 byte allocation with 16777120 free bytes and 72MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:816)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:637)
at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:665)
at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:695)
at bitrump.fishygame.gameGraphics.onCreate(gameGraphics.java:41)
at android.app.Activity.performCreate(Activity.java:6374)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2879)
at android.app.ActivityThread.access$900(ActivityThread.java:182)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6141)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Does anyone have any information on how to make the app more efficient? It is crashing on one of the newest phones out there, a galaxy s6. The tablet which it works on by the way is an nvidia shield tablet.