无法从可绘制资源ID#0x7f0e008d中找到ColorStateList

时间:2017-05-24 10:27:38

标签: android

开始使用Android Studio 3.0。 Menu1构建是可以的但是当我生成Debug构建时,我在启动应用程序时遇到以下异常:

release

这是我正在使用的布局

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bitbitbitbit.thefreebees/com.bitbitbitbit.thefreebees.ui.activity.MainActivity}: android.view.InflateException: Binary XML file line #94: Binary XML file line #94: Error inflating class android.support.design.widget.NavigationView
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
       at android.app.ActivityThread.-wrap12(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6121)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by android.view.InflateException: Binary XML file line #94: Binary XML file line #94: Error inflating class android.support.design.widget.NavigationView

Caused by android.view.InflateException: Binary XML file line #94: Error inflating class android.support.design.widget.NavigationView

Caused by java.lang.reflect.InvocationTargetException
       at java.lang.reflect.Constructor.newInstance0(Constructor.java)
       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.rInflate(LayoutInflater.java:858)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(SourceFile:292)
       at android.support.v7.app.AppCompatActivity.setContentView(SourceFile:140)
       at com.bitbitbitbit.thefreebees.ui.activity.MainActivity.onCreate(SourceFile:153)
       at android.app.Activity.performCreate(Activity.java:6682)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
       at android.app.ActivityThread.-wrap12(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6121)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by android.view.InflateException: Binary XML file line #24: Binary XML file line #24: Error inflating class TextView

Caused by android.view.InflateException: Binary XML file line #24: Error inflating class TextView

Caused by android.content.res.Resources$NotFoundException: Can't find ColorStateList from drawable resource ID #0x7f0e008d
       at android.content.res.ResourcesImpl.loadColorStateList(ResourcesImpl.java:840)
       at android.content.res.Resources.loadColorStateList(Resources.java:1002)
       at android.content.res.TypedArray.getColorStateList(TypedArray.java:531)
       at android.widget.TextView.<init>(TextView.java:775)
       at android.widget.TextView.<init>(TextView.java:704)
       at android.support.v7.widget.AppCompatTextView.<init>(SourceFile:62)
       at android.support.v7.widget.AppCompatTextView.<init>(SourceFile:58)
       at android.support.v7.app.AppCompatViewInflater.createView(SourceFile:103)
       at android.support.v7.app.AppCompatDelegateImplV9.createView(SourceFile:1029)
       at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(SourceFile:1087)
       at android.support.v4.view.d$a.onCreateView(SourceFile:47)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
       at android.support.design.internal.NavigationMenuPresenter.inflateHeaderView(SourceFile:211)
       at android.support.design.widget.NavigationView.inflateHeaderView(SourceFile:269)
       at android.support.design.widget.NavigationView.<init>(SourceFile:178)
       at android.support.design.widget.NavigationView.<init>(SourceFile:100)
       at java.lang.reflect.Constructor.newInstance0(Constructor.java)
       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.rInflate(LayoutInflater.java:858)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(SourceFile:292)
       at android.support.v7.app.AppCompatActivity.setContentView(SourceFile:140)
       at com.bitbitbitbit.thefreebees.ui.activity.MainActivity.onCreate(SourceFile:153)
       at android.app.Activity.performCreate(Activity.java:6682)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
       at android.app.ActivityThread.-wrap12(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6121)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

0 个答案:

没有答案