I am very new to Android programming and have a small app I have been putting together. It is just a simple slide view on a topic when user touches a specific button. All works very well as intended except on a Huawei G716-L070 running Android 4.2.2 API 17. The app has been set up to use min of SDK 14.
When the first button is pressed the following is the Logcat output :-
I/dalvikvm-heap: Grow heap (frag case) to 32.714MB for 1920016-byte allocation I/dalvikvm-heap: Grow heap (frag case) to 40.030MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 47.355MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 54.680MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 62.005MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 69.332MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 76.657MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 83.982MB for 7680016-byte allocation
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
I/Ads: Starting ad request.
I/Ads: Use AdRequest.Builder.addTestDevice("430EEBDFC6516F3DB989DBE19B86198E") to get test ads on this device.
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
I/Choreographer: Skipped 56 frames! The application may be doing too much work on its main thread.
W/GooglePlayServicesUtil: Google Play services is missing.
I/Ads: Scheduling ad refresh 70000 milliseconds from now.
I/Ads: Ad finished loading.
Then if another button is pressed the following :-
I/dalvikvm-heap: Grow heap (frag case) to 91.760MB for 7680016-byte allocation
I/dalvikvm-heap: Clamp target GC heap from 97.751MB to 96.000MB
I/dalvikvm-heap: Forcing collection of SoftReferences for 7680016-byte allocation
I/dalvikvm-heap: Clamp target GC heap from 97.744MB to 96.000MB
E/dalvikvm-heap: Out of memory on a 7680016-byte allocation.
I/dalvikvm: "main" prio=5 tid=1 RUNNABLE
I/dalvikvm: | group="main" sCount=0 dsCount=0 obj=0x40cccb38 self=0x40c982b8
I/dalvikvm: | sysTid=7021 nice=0 sched=0/0 cgrp=apps handle=1074789596
I/dalvikvm: | state=R schedstat=( 0 0 0 ) utm=11547 stm=958 core=0
I/dalvikvm: at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
I/dalvikvm: at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502)
I/dalvikvm: at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355)
I/dalvikvm: at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785)
I/dalvikvm: at android.content.res.Resources.loadDrawable(Resources.java:1965)
I/dalvikvm: at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
I/dalvikvm: at android.widget.ImageView.<init>(ImageView.java:120)
I/dalvikvm: at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:72)
I/dalvikvm: at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:68)
I/dalvikvm: at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1024)
I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1081)
I/dalvikvm: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
I/dalvikvm: at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
I/dalvikvm: at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
I/dalvikvm: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
I/dalvikvm: at com.qualassur.learnenglish.Abc_hn_Activity.onCreate(Abc_hn_Activity.java:24)
I/dalvikvm: at android.app.Activity.performCreate(Activity.java:5104)
I/dalvikvm: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
I/dalvikvm: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2147)
I/dalvikvm: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
I/dalvikvm: at android.app.ActivityThread.access$600(ActivityThread.java:144)
I/dalvikvm: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
I/dalvikvm: at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm: at android.os.Looper.loop(Looper.java:137)
I/dalvikvm: at android.app.ActivityThread.main(ActivityThread.java:5074)
I/dalvikvm: at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm: at java.lang.reflect.Method.invoke(Method.java:511)
I/dalvikvm: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
I/dalvikvm: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
I/dalvikvm: at dalvik.system.NativeStart.main(Native Method)
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40ccbac8)
And a message is on the screen saying the app is closing but in reality just closes the activity and returns to the menu options.
If the same button is pressed after this and before any other button is pressed the following is the logcat out put and all work.
I/dalvikvm-heap: Grow heap (frag case) to 38.795MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 46.109MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 53.435MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 60.760MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 68.085MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 75.411MB for 7680016-byte allocation
I/dalvikvm-heap: Grow heap (frag case) to 82.737MB for 7680016-byte allocation
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
I/Ads: Starting ad request.
I/Ads: Use AdRequest.Builder.addTestDevice("430EEBDFC6516F3DB989DBE19B86198E") to get test ads on this device.
W/GooglePlayServicesUtil: Google Play Store is missing.
W/GooglePlayServicesUtil: Google Play Store is missing.
I/Choreographer: Skipped 39 frames! The application may be doing too much work on its main thread.
W/GooglePlayServicesUtil: Google Play services is missing.
I/Ads: Scheduling ad refresh 70000 milliseconds from now.
I/Ads: Ad finished loading.
W/Ads: JS: The page at about:blank displayed insecure content from gmsg://mobileads.google.com/viewabilityChanged?hashCode=7516e93f-f26b-4f58-b16d-a43729a40b35&clickString=BBdBVbOTWWuWvKoTb2AT6mqioBADG04v_mQcAABABOAHIAQnIA4oEiAXH2LXzAqAGLtIIBQiAYRAB&isVisible=1&google.afma.Notify_dt=1524032621711.
(null:1)
W/Web Console: The page at about:blank displayed insecure content from gmsg://mobileads.google.com/viewabilityChanged?hashCode=7516e93f-f26b-4f58-b16d-a43729a40b35&clickString=BBdBVbOTWWuWvKoTb2AT6mqioBADG04v_mQcAABABOAHIAQnIA4oEiAXH2LXzAqAGLtIIBQiAYRAB&isVisible=1&google.afma.Notify_dt=1524032621711.
at null:1
W/Ads: JS: The page at about:blank displayed insecure content from gmsg://mobileads.google.com/viewabilityChanged?hashCode=7516e93f-f26b-4f58-b16d-a43729a40b35&clickString=BBdBVbOTWWuWvKoTb2AT6mqioBADG04v_mQcAABABOAHIAQnIA4oEiAXH2LXzAqAGLtIIBQiAYRAB&isVisible=1&google.afma.Notify_dt=1524032621711.
(null:1)
W/Web Console: The page at about:blank displayed insecure content from gmsg://mobileads.google.com/viewabilityChanged?hashCode=7516e93f-f26b-4f58-b16d-a43729a40b35&clickString=BBdBVbOTWWuWvKoTb2AT6mqioBADG04v_mQcAABABOAHIAQnIA4oEiAXH2LXzAqAGLtIIBQiAYRAB&isVisible=1&google.afma.Notify_dt=1524032621711.
at null:1
W/Ads: JS: The page at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html displayed insecure content from file:///android_asset/webkit/android-weberror.png.
(null:1)
W/Web Console: The page at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html displayed insecure content from file:///android_asset/webkit/android-weberror.png.
at null:1
All other phones and tablets work as should or as expected just this one Huawei phone, other newer models of Huawei phone work well, is it just that this phone is older and thus not able to run.