-3

I recently started on Android Studio but all of a sudden my app is crashing. My last time when I had this problem I was able to fix it after a bit of testing out and pinpointing what the problem was. This time, on the other hand, I am completely confused as I have 0 errors in my code screen. I checked the Logcat and I dont even understand anything from it. Can someone help me read this debug log so I can understand where to fix the problem?

08-17 14:20:32.048 31768-31775/? E/art: Failed sending reply to debugger: Broken pipe 08-17 14:20:32.423 31768-31768/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.mathe.trickytriviagame, PID: 31768
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mathe.trickytriviagame/com.example.mathe.trickytriviagame.HomePage}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2726)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2787)
    at android.app.ActivityThread.-wrap12(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1504)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6247)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
 Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
 Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
 Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
    at android.view.LayoutInflater.createView(LayoutInflater.java:645)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
    at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
    at com.example.mathe.trickytriviagame.HomePage.onCreate(HomePage.kt:11)
    at android.app.Activity.performCreate(Activity.java:6757)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2787)
    at android.app.ActivityThread.-wrap12(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1504)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6247)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
 Caused by: java.lang.OutOfMemoryError: Failed to allocate a 307200012 byte allocation with 8388608 free bytes and 246MB until OOM
    at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:620)
    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:455)
    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1152)
    at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:855)
    at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:706)
    at android.content.res.Resources.loadDrawable(Resources.java:863)
    at android.content.res.TypedArray.getDrawable(TypedArray.java:928)
    at android.view.View.<init>(View.java:4188)
    at android.view.ViewGroup.<init>(ViewGroup.java:578)
    at android.view.ViewGroup.<init>(ViewGroup.java:574)
    at android.view.ViewGroup.<init>(ViewGroup.java:570)
    at android.support.constraint.ConstraintLayout.<init>(ConstraintLayout.java:566)
        ... 23 more
Zoe
  • 27,060
  • 21
  • 118
  • 148
Mathew E.
  • 67
  • 1
  • 6

1 Answers1

0

resize your layout images src from drawable folder, app is crashing due to image size is greater then usual make the image size reduce. to

Emdad Hossain
  • 387
  • 1
  • 3
  • 10