当我尝试在我的应用中打开一个意图时,我得到一个布局错误说
Binary XML file line #11: Binary XML file line #26: Error inflating class <unknown>
我已经读过,当你有一个糟糕的抽签时,它会发生在人们面前,但我不会这样做。我有任何照片,我的布局
可能是什么问题?
我的主要XML
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_aligment__best__position_"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_aligment__best__position_"
app:menu="@menu/aligment_best_position_layout_drawer" />
</android.support.v4.widget.DrawerLayout>
我的堆栈跟踪:
05-29 17:19:45.703 29564-29564/apps.radwin.wintouch I/Timeline: Timeline: Activity_launch_request id:apps.radwin.wintouch time:18267340
05-29 17:19:45.743 29564-29564/apps.radwin.wintouch W/ResourcesManager: getTopLevelResources: /data/app/apps.radwin.wintouch-1/base.apk / 1.0 running in apps.radwin.wintouch rsrc of package apps.radwin.wintouch
05-29 17:19:45.743 29564-29564/apps.radwin.wintouch W/ResourcesManager: getTopLevelResources: /data/app/apps.radwin.wintouch-1/base.apk / 1.0 running in apps.radwin.wintouch rsrc of package apps.radwin.wintouch
05-29 17:19:45.753 29564-30072/apps.radwin.wintouch V/MediaPlayer: decode(40, 8757724, 5795)
05-29 17:19:45.753 29564-29564/apps.radwin.wintouch D/myLogs: before super screen 3
05-29 17:19:45.753 29564-29564/apps.radwin.wintouch D/myLogs: AFTER super screen 3
05-29 17:19:45.773 29564-29564/apps.radwin.wintouch D/AbsListView: Get MotionRecognitionManager
05-29 17:19:45.773 29564-29564/apps.radwin.wintouch E/MotionRecognitionManager: mSContextService = android.hardware.scontext.ISContextService$Stub$Proxy@b3cb61e
05-29 17:19:45.773 29564-29564/apps.radwin.wintouch E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@18adeff
05-29 17:19:45.773 29564-29564/apps.radwin.wintouch E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@18adeff
05-29 17:19:45.793 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.793 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.803 29564-29564/apps.radwin.wintouch I/art: Alloc sticky concurrent mark sweep GC freed 24142(1388KB) AllocSpace objects, 0(0B) LOS objects, 2% free, 250MB/256MB, paused 231us total 11.314ms
05-29 17:19:45.803 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.813 29564-29564/apps.radwin.wintouch I/art: Clamp target GC heap from 266MB to 256MB
05-29 17:19:45.813 29564-29564/apps.radwin.wintouch I/art: Alloc partial concurrent mark sweep GC freed 2776(174KB) AllocSpace objects, 0(0B) LOS objects, 2% free, 250MB/256MB, paused 220us total 12.474ms
05-29 17:19:45.813 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.833 29564-29564/apps.radwin.wintouch I/art: Clamp target GC heap from 266MB to 256MB
05-29 17:19:45.833 29564-29564/apps.radwin.wintouch I/art: Alloc concurrent mark sweep GC freed 84(15KB) AllocSpace objects, 0(0B) LOS objects, 2% free, 250MB/256MB, paused 240us total 15.087ms
05-29 17:19:45.833 29564-29564/apps.radwin.wintouch I/art: Forcing collection of SoftReferences for 16MB allocation
05-29 17:19:45.833 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.843 29564-29564/apps.radwin.wintouch I/art: Clamp target GC heap from 266MB to 256MB
05-29 17:19:45.843 29564-29564/apps.radwin.wintouch I/art: Alloc concurrent mark sweep GC freed 16(512B) AllocSpace objects, 0(0B) LOS objects, 2% free, 250MB/256MB, paused 201us total 13.641ms
05-29 17:19:45.843 29564-29564/apps.radwin.wintouch W/art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 5679600 free bytes and 5MB until OOM"
05-29 17:19:45.843 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.843 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.843 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.853 29564-29564/apps.radwin.wintouch I/art: Clamp target GC heap from 266MB to 256MB
05-29 17:19:45.853 29564-29564/apps.radwin.wintouch I/art: Alloc partial concurrent mark sweep GC freed 4(128B) AllocSpace objects, 0(0B) LOS objects, 2% free, 250MB/256MB, paused 202us total 11.001ms
05-29 17:19:45.853 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.873 29564-29564/apps.radwin.wintouch I/art: Clamp target GC heap from 266MB to 256MB
05-29 17:19:45.873 29564-29564/apps.radwin.wintouch I/art: Alloc concurrent mark sweep GC freed 2(64B) AllocSpace objects, 0(0B) LOS objects, 2% free, 250MB/256MB, paused 181us total 13.377ms
05-29 17:19:45.873 29564-29564/apps.radwin.wintouch I/art: Forcing collection of SoftReferences for 16MB allocation
05-29 17:19:45.873 29564-29564/apps.radwin.wintouch I/art: Starting a blocking GC Alloc
05-29 17:19:45.883 29564-29564/apps.radwin.wintouch I/art: Clamp target GC heap from 266MB to 256MB
05-29 17:19:45.883 29564-29564/apps.radwin.wintouch I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 2% free, 250MB/256MB, paused 228us total 14.561ms
05-29 17:19:45.883 29564-29564/apps.radwin.wintouch W/art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 5680224 free bytes and 5MB until OOM"
05-29 17:19:45.883 29564-29564/apps.radwin.wintouch D/skia: --- allocation failed for scaled bitmap
05-29 17:19:45.883 29564-29564/apps.radwin.wintouch D/AndroidRuntime: Shutting down VM
05-29 17:19:45.883 29564-29564/apps.radwin.wintouch E/AndroidRuntime: FATAL EXCEPTION: main
Process: apps.radwin.wintouch, PID: 29564
java.lang.RuntimeException: Unable to start activity ComponentInfo{apps.radwin.wintouch/apps.radwin.wintouch.Aligment_Best_Position_Activity}: android.view.InflateException: Binary XML file line #11: Binary XML file line #26: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #26: Error inflating class <unknown>
at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at apps.radwin.wintouch.Aligment_Best_Position_Activity.onCreate(Aligment_Best_Position_Activity.java:45)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: android.view.InflateException: Binary XML file line #26: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:657)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1001)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:843)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at apps.radwin.wintouch.Aligment_Best_Position_Activity.onCreate(Aligment_Best_Position_Activity.java:45)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:631)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1001)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:843)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at apps.radwin.wintouch.Aligment_Best_Position_Activity.onCreate(Aligment_Best_Position_Activity.java:45)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 16777228 byte allocation with 5680224 free bytes and 5MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:2228)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:4211)
at android.content.res.Resources.loadDrawable(Resources.java:4085)
at android.content.res.Resources.loadDrawable(Resources.java:3935)
at android.content.res.TypedArray.getDrawable(TypedArray.java:886)
at android.widget.ImageView.<init>(ImageView.java:157)
at android.widget.ImageButton.<init>(ImageButton.java:85)
at android.widget.ImageButton.<init>(ImageButton.java:81)
at android.support.design.widget.VisibilityAwareImageButton.<init>(VisibilityAwareImageButton.java:36)
at android.support.design.widget.FloatingActionButton.<init>(FloatingActionButton.java:114)
at android.support.design.widget.FloatingActionButton.<init>(FloatingActionButton.java:110)
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:631)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1001)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:843)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at apps.radwin.wintouch.Aligment_Best_Position_Activity.onCreate(Aligment_Best_Position_Activity.java:45)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)