Open NLanese opened 2 years ago
I am suffering from this problem too after following the configuration
section only, on Android. iOS also works fine.
> ./gradlew clean
...
FAILURE: Build failed with an exception.
* Where:
Build file '[redacted]/node_modules/react-native-orientation/android/build.gradle' line: 19
* What went wrong:
A problem occurred evaluating project ':react-native-orientation'.
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
@NLanese see here for Expo's package which might tackle your needs. This package seems dead since 2018 unfortunately.
https://docs.expo.dev/versions/latest/sdk/screen-orientation/
I changed the word compile to implementation like this :: implementation "com.facebook.react:react-native:+"
go to package in node_modules and then go to android/build.gradle replace compile with implementation
node_modules>react-native-orientation>android>build.gradle like this dependencies { implementation "com.facebook.react:react-native:+" }
The last PR that was mentioned this issue is the https://github.com/yamill/react-native-orientation/pull/430
After following all of the manual linking instructions, I am unable to build or run the app as a whole on any Android Devices (iOS works fine) React Native has moved away from
npx react-native link
meaning the instructions for auto-linking no longer seem to apply, yet there's a lot of issues getting this to work on Android.