Skip to content Skip to sidebar Skip to footer

React Native Fbsdk Build Error Could Not Find Method Implementation()

I am using RN 0.55.4 react-native-fbsdk 0.8.0 There is a build error Where: Build file 'C:\Users\WOT\fdrrnc\node_modules\react-native-fbsdk\android\build.gradle' line: 30 Wha

Solution 1:

In case anyone is still looking for this, here's what I did based on the answers from Pritish for this question and similar ones.

Make sure you are using the compatible version of gradle

Update android/gradle/wrapper/gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Update android/build.gradle classpath

classpath 'com.android.tools.build:gradle:3.1.2'

Add maven google url

Update android/build.gradle (both buildscript and allprojects)

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    ...
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

Check that you are using at least API 26

If you are using an older react native version prior to the changes where they updated to use API 26, check these values in your android/app/build.gradle file:

compileSdkVersion 26
buildToolsVersion "26.0.3"

defaultConfig {
    ...
    targetSdkVersion 26
    ...
}

Solution 2:

Your gradle version needs to be version 3.0 or higher in order to use implementation.

Therefore you need to upgrade it.

build.gradle (project level)

dependencies {
   classpath 'com.android.tools.build:gradle:3.x.x'
}

gradle wrapper-properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Post a Comment for "React Native Fbsdk Build Error Could Not Find Method Implementation()"