ExperienceActivityUtils: A TaskDescription's primary color should be opaque

Hi all,

I have been facing this issue on a detached ExpoKit build for Android.
I have seen that there are similar topics to this problem here: #11390 and here: #14122, but none of them seem to have been resolved.

I have already tried changing the values of ‘colorPrimary’ and ‘colorPrimaryDark’ inside the colors.xml file as well as changing these values within the styles.xml file, but this also does not seem to work.

This issue occurs on both an emulator and an Android device.
SDK versions that I tested on were 23, 27 and 28 using Expo 30.

CrashLytics stacktrace:

Non-fatal Exception: java.lang.RuntimeException: A TaskDescription’s primary color should be opaque
at android.app.ActivityManager$TaskDescription.(ActivityManager.java:1536)
at host.exp.exponent.utils.ExperienceActivityUtils$1.onLoadBitmap(ExperienceActivityUtils.java:104)
at host.exp.exponent.ExponentManifest$5.onPostExecute(ExponentManifest.java:640)
at host.exp.exponent.ExponentManifest$5.onPostExecute(ExponentManifest.java:603)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.-wrap1(Unknown Source)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Android Studio Logcat error:

E/ExperienceActivityUtils: java.lang.RuntimeException: A TaskDescription’s primary color should be opaque

Any help with this will be appreciated.
Thanks in Advance

Hey @wiann – could you post your app.json here, as well as the values of colorPrimary and colorPrimaryDark you’ve tried in the styles.xml file?

Hi @esamelson, thanks for the quick reply.

I have tried the following colors: #607D8B for colorPrimary and #FF9800 for colorPrimaryDark inside the colors.xml file.

I have changed all the colors in the styles.xml that does not make use of the colors.xml file.

Belowe is the app.json as requested:

“expo”: {
“name”: “vsp-exp”,
“description”: “My Application”,
“slug”: “vsp-exp”,
“privacy”: “unlisted”,
“sdkVersion”: “30.0.0”,
“platforms”: [
“version”: “10.0”,
“orientation”: “portrait”,
“icon”: “./assets/icon.png”,
“splash”: {
“image”: “./assets/shell_launch_background_image.png”,
“resizeMode”: “cover”,
“backgroundColor”: “#E60000
“updates”: {
“enabled”: true,
“checkAutomatically”: “ON_ERROR_RECOVERY”,
“fallbackToCacheTimeout”: 0
“assetBundlePatterns”: [
“ios”: {
“supportsTablet”: true,
“bundleIdentifier”: “my.application”,
“publishBundlePath”: “ios/vsp-exp/Supporting/shell-app.bundle”,
“publishManifestPath”: “ios/vsp-exp/Supporting/shell-app-manifest.json”
“scheme”: “myapplication”,
“android”: {
“package”: “my.application.app”,
“publishBundlePath”: “android/app/src/main/assets/shell-app.bundle”,
“publishManifestPath”: “android/app/src/main/assets/shell-app-manifest.json”,
“config”: {
“fabric”: {
“apiKey”: “hidden for public post”,
“buildSecret”: "hidden for public post
“hooks”: {
“postPublish”: [
“file”: “sentry-expo/upload-sourcemaps”,
“config”: {
“organization”: “private”,
“project”: “react”,
“authToken”: “hidden for public post”
“androidStatusBar”: {
“backgroundColor”: “#BD0000
“extra”: {
“showEnvironmentPicker”: true

PS: I have also tried changing the android status bar background color as well as the splash background color, but this did also not work.

@wiann – you need to specify the top-level primaryColor key in your app.json file if you want to set the status bar color: https://docs.expo.io/versions/v30.0.0/workflow/configuration#primarycolor

FWIW, I am able to trigger this exception when I don’t have that key set in app.json, but it does not cause a crash (it says Non-fatal Exception) and the app simply falls back to Expo’s default blue status bar color.

Hi @esamelson, once again, thank you for the quick reply.

I have added the primaryColor to the app.json and that seems to have solved the problem.
Thank you for the help. It is much appreciated.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.