0

i just have a crash on my app. but I don't know how to read my logcat. can someone guide me?

12-09 19:02:36.877: D/skia(11797): --- allocation failed for scaled bitmap
12-09 19:02:36.877: D/AndroidRuntime(11797): Shutting down VM
12-09 19:02:36.877: W/dalvikvm(11797): threadid=1: thread exiting with uncaught exception (group=0x417a5da0)
12-09 19:02:36.887: E/AndroidRuntime(11797): FATAL EXCEPTION: main
12-09 19:02:36.887: E/AndroidRuntime(11797): Process: com.example.baseapp, PID: 11797
12-09 19:02:36.887: E/AndroidRuntime(11797): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.baseapp/com.example.baseapp.Focusonautomotive}: android.view.InflateException: Binary XML file line #23: Error inflating class <unknown>
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.ActivityThread.access$800(ActivityThread.java:163)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.os.Handler.dispatchMessage(Handler.java:102)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.os.Looper.loop(Looper.java:157)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.ActivityThread.main(ActivityThread.java:5335)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at java.lang.reflect.Method.invokeNative(Native Method)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at java.lang.reflect.Method.invoke(Method.java:515)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at dalvik.system.NativeStart.main(Native Method)
12-09 19:02:36.887: E/AndroidRuntime(11797): Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class <unknown>
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.createView(LayoutInflater.java:626)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:340)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.Activity.setContentView(Activity.java:1973)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at com.example.baseapp.Focusonautomotive.onCreate(Focusonautomotive.java:15)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.Activity.performCreate(Activity.java:5389)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256)
12-09 19:02:36.887: E/AndroidRuntime(11797):    ... 11 more
12-09 19:02:36.887: E/AndroidRuntime(11797): Caused by: java.lang.reflect.InvocationTargetException
12-09 19:02:36.887: E/AndroidRuntime(11797):    at java.lang.reflect.Constructor.constructNative(Native Method)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.view.LayoutInflater.createView(LayoutInflater.java:600)
12-09 19:02:36.887: E/AndroidRuntime(11797):    ... 27 more
12-09 19:02:36.887: E/AndroidRuntime(11797): Caused by: java.lang.OutOfMemoryError
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:677)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:507)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:872)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.content.res.Resources.loadDrawable(Resources.java:3054)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.widget.ImageView.<init>(ImageView.java:133)
12-09 19:02:36.887: E/AndroidRuntime(11797):    at android.widget.ImageView.<init>(ImageView.java:123)
12-09 19:02:36.887: E/AndroidRuntime(11797):    ... 30 more

I try reading thru the guide from : https://androidactivity.wordpress.com/2011/09/24/solution-for-outofmemoryerror-bitmap-size-exceeds-vm-budget/

but I aint sure if its usable with my app.

currently my app have a splash screen which then go to a main layout with a list of clickable option. by clicking the option it will bring me to the other activity.

all my layout are quite loaded with some image and all are in PNG format.

pls advise as I am new and scratching my head trying my best to learn

  • You need to provide the relevant code as well, otherwise it's hard to help. – Magnilex Dec 09 '14 at 11:07
  • like that code? java or the XML? –  Dec 09 '14 at 11:08
  • Clearly you have an `java.lang.OutOfMemoryError` error. You need to provide more information for that – Nasir Dec 09 '14 at 11:08
  • Didn't see the out of memory exception. But generally, yes, you need to provide the source code that is relevant. In this case, I would however start with analyzing memory leaks. – Magnilex Dec 09 '14 at 11:09
  • I was just adding in a layout file with more image on then I run it on my note 3 and then this happen. sorry for the trouble guys as I am really new to this stuff –  Dec 09 '14 at 11:11
  • how can I add in my java code? I try to add but it say it have error and prevent me from adding it in –  Dec 09 '14 at 11:36
  • I try reading thru the guide from : https://androidactivity.wordpress.com/2011/09/24/solution-for-outofmemoryerror-bitmap-size-exceeds-vm-budget/ but I ain't sure if its usable with my app. currently my app have a splash screen which then go to a main layout with a list of clickable option. by clicking the option it will bring me to the other activity. all my layout are quite loaded with some image and all are in PNG format. pls advise as I am new and scratching my head trying my best to learn –  Dec 10 '14 at 03:53

1 Answers1

0

This is the reason:

Caused by: java.lang.OutOfMemoryError
agad
  • 2,192
  • 1
  • 20
  • 32