当前位置: 代码迷 >> 综合 >> 安卓一个奇怪的LOG:ColorDrawable.setColor
  详细解决方案

安卓一个奇怪的LOG:ColorDrawable.setColor

热度:47   发布时间:2023-12-11 20:16:03.0

这个问题,不是固定出现,而是很少出现。

次数多了也能复现。

从LOG分析:setContentView()中,包含了一个颜色,导致出错?

 

LDYView: ColorDrawable setColor color 0x88000000 mState.mBaseColor 0x0 mState.mBaseColor 0x0

LDYView: java.lang.Throwable

        at android.graphics.drawable.ColorDrawable.setColor(ColorDrawable.java:113)
        at android.graphics.drawable.ColorDrawable.<init>(ColorDrawable.java:57)
        at android.content.res.Resources.loadDrawable(Resources.java:2063)
        at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
        at android.view.View.<init>(View.java:3555)
        at android.widget.TextView.<init>(TextView.java:623)
        at android.widget.Chronometer.<init>(Chronometer.java:100)
        at android.widget.Chronometer.<init>(Chronometer.java:92)
        at java.lang.reflect.Constructor.constructNative(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at android.view.LayoutInflater.createView(LayoutInflater.java:594)
        at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
        at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
        at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
        at android.app.Activity.setContentView(Activity.java:1929)
        at VideoActivity.init(Unknown Source)
        at android.app.Activity.performCreate(Activity.java:5231)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
        at android.app.ActivityThread.access$800(ActivityThread.java:135)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5030)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:649)
        at dalvik.system.NativeStart.main(Native Method)