react-native-orientation icon indicating copy to clipboard operation
react-native-orientation copied to clipboard

Android Builds Fail Could not find method compile() for arguments [project ':react-native-orientation']

Open NLanese opened this issue 1 year ago • 4 comments

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.

NLanese avatar Sep 30 '22 04:09 NLanese

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.

kirgy avatar Oct 06 '22 12:10 kirgy

@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/

kirgy avatar Oct 06 '22 12:10 kirgy

I changed the word compile to implementation like this :: implementation "com.facebook.react:react-native:+"

ImahImm avatar Oct 07 '22 04:10 ImahImm