question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navigation Bar color not changing in EAS build standalone app?

See original GitHub issue

The navigation Bar color is not changing even though I’ve mentioned it in the app.json file.

This issue has been discussed here @brentvatne asked to post an issue regarding this.

My app.json file

{
  "expo": {
    "name": "NavigationBar",
    "slug": "NavigationBar",
    "version": "1.2.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#2e2a5a"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "bundleIdentifier": "com.NavigationBar.NavigationBar",
      "buildNumber": "1.0.0",
      "supportsTablet": true
    },
    "android": {
      "package": "com.NavigationBar.NavigationBar",
      "versionCode": 1,
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#2e2a5a"
      }
    },
    "androidStatusBar": {
      "barStyle": "light-content",
      "backgroundColor": "#2e2a5a"
    },
    "androidNavigationBar": {
      "barStyle": "light-content",
      "backgroundColor": "#2e2a5a"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

Expo Go app develeopment Screenshot

Expo Go developement Screenshot

EAS Build apk screenshot result (eas build -p android --profile NavigationBar)

EAS Build Screenshot

Expo Build apk screenshot result (expo build:android -t apk)

Expo Build Screenshot

I’ve added EAS build apk and Expo Build apk links below.

EAS build apk link - https://drive.google.com/file/d/1xNsZPN191h8AgCPImBocBFw-Stk3-CQH/view?usp=sharing

Expo Build apk link - https://drive.google.com/file/d/1bDUOS6J32wTdAoXa_4jy9we8LfzJD69E/view?usp=sharing

Minimal Reproducible Snack Example

App.js

import * as React from "react";
import { Text, View, StyleSheet, Button } from "react-native";

export default function App() {
  return (
    <View style={styles.container}>
      <Button title="Random Button" />
      <View style={styles.BottomBar}>
        <Text>Navigation Bar color not changing in EAS Build</Text>
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
    backgroundColor: "#ecf0f1",
    padding: 8,
  },
  BottomBar: {
    position: "absolute",
    bottom: 0,
    height: 40,
    width: "100%",
    justifyContent: "center",
    alignItems: "center",
  },
});

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kartikeyvaishcommented, Jul 5, 2021

This is fixed now. Thanks, @brentvatne @EvanBacon.

0reactions
bzozoocommented, Oct 4, 2022

Same problem with statusbar too

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring the status bar - Expo Documentation
You can place an empty View on top of your screen with a background color to act as a status bar or set...
Read more >
Expo EAS build ignores background color - Stack Overflow
i.e. in the EAS-APK the nav-bar keeps the default white bg-color, whereas the older expo-APK produces the expected result. What am I missing?...
Read more >
How to change the navbar color when you scroll in ReactJS
We will define both these CSS classes in our App.css file. When we start scrolling down the page, the function changeNavbarColor gets triggered ......
Read more >
barTintColor not working correctly… | Apple Developer Forums
Setting up navigationBar's background color fixes the issue for me. Not sure if this is a correct solution. navigationController?.navigationBar.backgroundColor ...
Read more >
Build and test your Android App Bundle
Deploy using app bundles with Android Studio · Select Run > Edit Configurations from the menu bar. · Select a run/debug configuration from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found