I am trying to install react-native-camera. 
I did npm install react-native-camera react-native link react-native-camera.
It gives me the error saying Gradle sync failed: Could not find method google() for arguments [] on repository container.
I tried manual link too as stated in the documentation till step 6 where I added
allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
    }
}
I used exifinterface versions, e.g. 27.+ instead of 25.+
I have distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip as distributionUrl and classpath 'com.android.tools.build:gradle:2.2.3'
I dont know what am I missing. When I open my android studio it gives me error Gradle sync failed: Could not find method google() for arguments [] on repository container
And when I run react-native run-android on my phone it gives me error saying undefined is not an object (evaluating 'cameramanager.aspect')
Can anyone help me what am I missing here ??
Here is my gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}