Open usmanfaisal60 opened 4 years ago
Can you show your crash logs?
Seems to be an Android 9.0 problem, I got the same :(
The apps logs undefined
when catching the error and then crashes.
can you test in latest release?
I just did, and its still crashing in version 1.0
Ok, I will try to test on a device with Android 9, and warning as soon as there is news. Thanks.
Any updates?
Hi, I tested it today with Android API 29 (Q) and I didn't have any errors. Can you get me a repository where the problem occurs?
I'm able to recreate this behavior on an Android 10 device @thebylito. A demo repo can be found at this branch:
https://github.com/crutchcorn/GitShark/tree/crashing_nav_bar
It seems that @coin3x might have figured out the reason for the crashing in specific instances:
https://github.com/crutchcorn/GitShark/issues/6#issuecomment-613437549
Crashing for me on Android 10 (Essential PH-1) and Android 8.1 (Pixel 3 emulator).
TypeError: null is not an object (evaluating 'NavigationBarColor.changeNavigationBarColor')
Usage:
import React from "react";
import { Text } from "react-native";
import changeNavigationBarColor from "react-native-navigation-bar-color";
export function App() {
changeNavigationBarColor("blue", true, true);
return <Text>Hello world</Text>;
}
Dependencies in package.json:
"expo": "~38.0.8",
"react": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.1.tar.gz",
"react-native-navigation-bar-color": "^2.0.1"
Hey @thebylito, on installing the package my app starting crashing. After running adb logcat I found that I am getting an classNotFoundException for class MainApplication.
Hi, @bjornarhagen , try rebuilding your app. In my case, I uninstalled the app and reinstalled it and
TypeError: null is not an object (evaluating 'NavigationBarColor.changeNavigationBarColor')
was resolved
I have the same error... Did anyone manage to solve it? :shrug:
Rebuilding the app solved my error.
Well, I just installed this package and I also have this problem :/
To be more precise, the error seems to be on the evaluation of Platform.OS, which is apparently not defined.
I have the same problem:
"[TypeError: null is not an object (evaluating 'NavigationBarColor.changeNavigationBarColor')]"
Keeps showing up no matter what I do, like:
eas build --platform android --profile development --local
with expo-dev-client
installed as suggested here https://expo.canny.io/feature-requests/p/android-navigation-bar-background-color-change-on-the-fly. Although this method changes the color of the Navigation Bar, it's not thanks to react-native-navigation-bar-color
since the package crashes with that error message, but rather thanks to the config text added to app.js:{
"expo": {
...
"androidNavigationBar": {
"visible": true,
"barStyle": "light-content",
"backgroundColor": "#004D40"
},
...
}
}
The down side of this last method is that it can't be done at runtime, which is what react-native-navigation-bar-color
is supposed to do but unfortunately it crashes with the error message I mentioned.
Dependencies:
Is anyone else having the same problem?
I am following the same steps but my app keeps crashing. Android 9.0 react-native-cli: 2.0.1 react-native: 0.61.1 Any help will be appreciated