我的应用程序崩溃了。但我不知道如何阅读我的logcat。 有人可以指导我吗?
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
但我不确定它是否可用于我的应用程序。
目前我的应用程序有一个启动画面,然后转到带有可点击选项列表的主布局。 通过单击选项,它将带我进入其他活动。
我的所有版面都装有一些图像,并且都是PNG格式。
请指教,因为我是新人,并且正在努力学习
答案 0 :(得分:0)
这就是原因:
Caused by: java.lang.OutOfMemoryError