Skip to content

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

@Noitidart

Description

@Noitidart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions