Resources $ NotFoundException:资源不是Drawable(颜色或路径)

时间:2018-11-06 11:41:57

标签: android

我最近在应用程序中更新了一个内部库,该内部库现在导致在SplashActivites onCreate方法上引发以下错误。资源ID 0x7f090053似乎也与颜色冲突,benchmark_interval_text是布局项目标识符。我试过清理,重建等,但是都导致相同的错误。

在SplashActivity的super.onCreate(bundle)调用期间发生错误。

我最近更新了build.gradle文件以针对API 28进行编译。

Caused by: android.content.res.Resources$NotFoundException: Resource "com.example.bundle:id/benchmark_interval_text" (7f090053) is not a Drawable (color or path): TypedValue{t=0x12/d=0x0 a=5 r=0x7f090053}
    at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:739)
    at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:609)
    at android.content.res.Resources.getDrawableForDensity(Resources.java:876)
    at android.content.res.XResources.getDrawableForDensity(XResources.java:868)
    at android.content.res.Resources.getDrawable(Resources.java:818)
    at android.content.res.XResources.getDrawable(XResources.java:790)
    at android.content.Context.getDrawable(Context.java:606)
    at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:463)
    at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203)
    at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
    at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:753)
    at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:196)
    at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:86)
    at android.support.v7.app.AppCompatDelegateImpl.<init>(AppCompatDelegateImpl.java:260)
    at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:182)
    at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)
    at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
    at com.example.bundle.SplashActivity.onCreate(SplashActivity.java:32)
    at android.app.Activity.performCreate(Activity.java:6998)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1230)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2899)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3046)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6798)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:108)

更新

我已降级为根据API 27进行编译,并发现使用com.android.support:appcompat-v7:28.0.0引起了我所面临的问题,但是为什么不这样做。是否有解决方案,以便我可以再次针对28进行编译?

0 个答案:

没有答案