kadiraydinli / react-native-system-navigation-bar

React Native lets you customize the navigation bar for Android.
https://www.npmjs.com/package/react-native-system-navigation-bar
MIT License
265 stars 19 forks source link

Unable to use in latest React Native version (in version `2.1.0`) #35

Closed BenJeau closed 1 year ago

BenJeau commented 1 year ago

When running an application using the latest version of this dependency with the latest version of React Native, the following error appears:

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':react-native-system-navigation-bar:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':react-native-system-navigation-bar:debugCompileClasspath'.
   > Could not find com.facebook.react:react-native:0.68.2.
     Required by:
         project :react-native-system-navigation-bar

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s

info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Seems to be releated to the following commit https://github.com/kadiraydinli/react-native-system-navigation-bar/commit/97653186f28c0276106eca6e0716a45c416b3340 Is there a reason to hardcode the react native version to 0.68.2 in this dependency? Trying to understand this change, as I'm using react native version 0.70.6 and it does not seem to work, but it is working in the previous version of this library. For now I'll just pin it to 2.0.1

juanamd commented 1 year ago

Same here, please revert that commit

kadiraydinli commented 1 year ago

The problem has been fixed. You can use it in the latest version.