5.1 Crash - A TaskDescription's primary color should be opaque

You can not use alfa in primary color. The primary color has to be opaque.

Change:

<item name="colorPrimaryDark">#4DFF9800</item>
<item name="colorPrimary">#4D607D8B</item>

To

<item name="colorPrimaryDark">#FF9800</item>
<item name="colorPrimary">#607D8B</item>

for api 21 in res/values-v21/style.xml file


Simple solution to the issue is to remove the opaque applied to the primary color in colors.xml

When opaque is applied to primary color the color code look like this "#aca688ff", where it has to be ex: "#F50057" (6 letters alphanumeric code without opaque).

Hope the above solution helps you to fix the issue.


@Konrad Krakowiak is right.
You can see the source code of android.app.ActivityManager#TaskDescription.

/**
    * Creates the TaskDescription to the specified values.
    *
    * @param label A label and description of the current state of this task.
    * @param icon An icon that represents the current state of this task.
    * @param colorPrimary A color to override the theme's primary color. This color must be opaque.
    */
    public TaskDescription(String label, Bitmap icon, int colorPrimary) {
      if ((colorPrimary != 0) && (Color.alpha(colorPrimary) != 255)) {
        throw new RuntimeException("A TaskDescription's primary color should be opaque");
      }

      mLabel = label;
      mIcon = icon;
      mColorPrimary = colorPrimary;
    }