Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NLanese opened this issue Sep 30, 2022 · 5 comments

Comments

@NLanese
Copy link

NLanese commented Sep 30, 2022

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.

@kirgy
Copy link

kirgy commented Oct 6, 2022

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
Copy link

kirgy commented Oct 6, 2022

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

@ImahImm
Copy link

ImahImm commented Oct 7, 2022

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

@sam9010
Copy link

sam9010 commented Apr 8, 2024

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:+"
}

@ItaloFalzoni
Copy link

The last PR that was mentioned this issue is the #430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants