启动应用程序时出现此错误

时间:2019-02-14 06:04:37

标签: android

为特定设备启动应用程序时,出现此错误

E/VdcInflateDelegate: Exception while inflating <vector>
    android.content.res.Resources$NotFoundException: File res/drawable/$ic_get_khaata__0.xml from color state list resource ID #0x7f080008
        at android.content.res.Resources.loadColorStateListForCookie(Resources.java:4403)
        at android.content.res.Resources.loadColorStateList(Resources.java:4352)
        at android.content.res.TypedArray.getColor(TypedArray.java:441)
        at android.support.v4.content.res.TypedArrayUtils.getNamedColor(TypedArrayUtils.java:124)
        at android.support.graphics.drawable.VectorDrawableCompat$VFullPath.updateStateFromTypedArray(VectorDrawableCompat.java:1746)
        at android.support.graphics.drawable.VectorDrawableCompat$VFullPath.inflate(VectorDrawableCompat.java:1712)
        at android.support.graphics.drawable.VectorDrawableCompat.inflateInternal(VectorDrawableCompat.java:743)
        at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:631)
        at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner(VectorDrawableCompat.java:590)
        at android.support.v7.widget.AppCompatDrawableManager$VdcInflateDelegate.createFromXmlInner(AppCompatDrawableManager.java:775)
        at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:363)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186)
        at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
        at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:58)
        at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:77)
        at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:67)
        at android.support.v7.app.AppCompatViewInflater.createImageView(AppCompatViewInflater.java:181)
        at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:105)
        at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1035)
        at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1092)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:758)
        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.rInflate(LayoutInflater.java:855)
        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 com.payswiff.khaata.activity.WelcomeActivity$MyViewPagerAdapter.instantiateItem(WelcomeActivity.java:134)
        at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1004)
        at android.support.v4.view.ViewPager.populate(ViewPager.java:1152)
        at android.support.v4.view.ViewPager.populate(ViewPager.java:1086)
        at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1616)
        at android.view.View.measure(View.java:20236)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:900)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
        at android.view.View.measure(View.java:20236)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6333)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
        at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
        at android.view.View.measure(View.java:20236)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6333)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
        at android.view.View.measure(View.java:20236)
        at android.view.ViewGroup.measureChildWithMar

1 个答案:

答案 0 :(得分:0)

您的资源位于不同的可绘制文件夹中。将资源添加到通用文件夹或将其添加到所有可绘制文件夹。