Skip to content

Could not find method implementation() for arguments [com.facebook.react:react-native:+]  #7

Open

Description

@leeleoo
"react-native": "^0.54.3",
"react-native-android-open-settings": "^1.2.0",
  • What went wrong:
    A problem occurred evaluating project ':react-native-android-open-settings'.

Could not find method implementation() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

in node_modules/react-native-android-open-settings/android/build.gradle

modify

dependencies {
    implementation 'com.facebook.react:react-native:+'
}

to

dependencies {
    compile 'com.facebook.react:react-native:+'
}

and it works

Activity

  1. effektsvk commented on Jan 28, 2019

    @effektsvk

    I've had a bit different error message, but it helped, thanks!

    MainApplication.java:6: error: package com.levelasquez.androidopensettings does not exist
    import com.levelasquez.androidopensettings.AndroidOpenSettingsPackage;
                                              ^
    MainApplication.java:59: error: cannot find symbol
                new AndroidOpenSettingsPackage(),
                    ^
      symbol: class AndroidOpenSettingsPackage
    
  2. donni106 commented on Mar 5, 2019

    @donni106

    @leeleoo but when you install your packages again or update them, your local change will be gone. You are using an older Android API level, right?

  3. effektsvk commented on Mar 5, 2019

    @effektsvk

    @donni106 That's why I made a fork, but now that I think about it a patch would be probably a better idea. AFAIK this is problem in gradle, not Android API level. compile is deprecated since gradle version 3, and I'm currently using 2.3.3 (classpath 'com.android.tools.build:gradle:2.3.3' in android/build.gradle)

  4. donni106 commented on Mar 5, 2019

    @donni106

    Yes sure, gradle version, not Android API level, my fault.

  5. leeleoo commented on Mar 8, 2019

    @leeleoo
    Author

    @donni106 yes and I update gradle version to 3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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