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

Build error - Could not find method implementation() #45

Open
Noitidart opened this issue May 29, 2018 · 2 comments
Open

Build error - Could not find method implementation() #45

Noitidart opened this issue May 29, 2018 · 2 comments

Comments

@Noitidart
Copy link
Contributor

Hi there,
In latest package I am getting the error pasted below when doing react-native run-android.

I suspect it's because of using implementation in your android/build.gradle, which I think is gradle 3+ only. And default react-native ships with gradle 2.

dependencies {
    implementation 'com.facebook.react:react-native:+'
}
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Mercurius\Documents\GitHub\trustedplatform_android\node_modules\react-native-directed-scrollview\android\build.gradle' line: 22

* What went wrong:
A problem occurred evaluating project ':react-native-directed-scrollview'.
> Could not find method implementation() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
@Noitidart Noitidart changed the title Build error Build error - Could not find method implementation() May 29, 2018
@Noitidart
Copy link
Contributor Author

I think it is this PR - #35 - which breaks it for everyone except the PR submitter.

@Noitidart
Copy link
Contributor Author

Yes I modified this line from "implementation" to "compile" and it fixed it.

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

1 participant