title: React Native: facebook-android-sdk dependency build error
body: <p>I'm running <code>React Native v0.53.0</code> and npm installed <code>react-native-fbsdk v0.7.0</code> but I can't build my project.</p>
  
  <p>I've seen various <a href="https://github.com/facebook/react-native-fbsdk/pull/339" rel="nofollow noreferrer">issues</a> and stackoverflow questions and it seems like it problem is sycning up the right versions. However I tried almost every version option I read online and I still get build errors. So, I reverted my changes to post this question. </p>
  
  <p>Thank you for any help!</p>
  
  <h2>android/app/build.gradle</h2>
  
  <pre><code>apply plugin: "com.android.application"
  
  import com.android.build.OutputFile
  
  project.ext.react = [
      entryFile: "index.js"
  ]
  
  apply from: "../../node_modules/react-native/react.gradle"
  
  /**
   * Set this to true to create two separate APKs instead of one:
   *   - An APK that only works on ARM devices
   *   - An APK that only works on x86 devices
   * The advantage is the size of the APK is reduced by about 4MB.
   * Upload all the APKs to the Play Store and people will download
   * the correct one based on the CPU architecture of their device.
   */
  def enableSeparateBuildPerCPUArchitecture = false
  
  /**
   * Run Proguard to shrink the Java bytecode in release builds.
   */
  def enableProguardInReleaseBuilds = false
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.1"
  
      defaultConfig {
          applicationId "com.upwork"
          minSdkVersion 16
          targetSdkVersion 22
          versionCode 1
          versionName "1.0"
          ndk {
              abiFilters "armeabi-v7a", "x86"
          }
      }
      splits {
          abi {
              reset()
              enable enableSeparateBuildPerCPUArchitecture
              universalApk false  // If true, also generate a universal APK
              include "armeabi-v7a", "x86"
          }
      }
      buildTypes {
          release {
              minifyEnabled enableProguardInReleaseBuilds
              proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
          }
      }
      // applicationVariants are e.g. debug, release
      applicationVariants.all { variant -&gt;
          variant.outputs.each { output -&gt;
              // For each separate APK per architecture, set a unique version code as described here:
              // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
              def versionCodes = ["armeabi-v7a":1, "x86":2]
              def abi = output.getFilter(OutputFile.ABI)
              if (abi != null) {  // null for the universal-debug, universal-release variants
                  output.versionCodeOverride =
                          versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
              }
          }
      }
  }
  
  dependencies {
      compile project(':react-native-fbsdk')
      compile fileTree(dir: "libs", include: ["*.jar"])
      compile "com.android.support:appcompat-v7:23.0.1"
      compile "com.facebook.react:react-native:+"  // From node_modules
  }
  
  // Run this once to be able to run the application with BUCK
  // puts all compile dependencies into folder libs for BUCK to use
  task copyDownloadableDepsToLibs(type: Copy) {
      from configurations.compile
      into 'libs'
  }
  </code></pre>
  
  <h2>android/build.gradle</h2>
  
  <pre><code> 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 {
              mavenLocal()
              jcenter()
              maven {
                  // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
                  url "$rootDir/../node_modules/react-native/android"
              }
          }
      }
  </code></pre>
  
  <h2>react-native-fbsdk/android/build.gradle</h2>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 26
      buildToolsVersion "26.0.2"
  
      defaultConfig {
          minSdkVersion 16
          targetSdkVersion 26
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile 'com.android.support:appcompat-v7:27.0.2'
      compile 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+
      compile 'com.facebook.android:facebook-android-sdk:4.+'
  }
  
  repositories {
      mavenCentral()
      jcenter()
      maven {
          url 'https://maven.google.com/'
          name 'Google'
      }
  }
  </code></pre>
  
  <h2>stacktrace</h2>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring project ':app'.
  &gt; Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
     &gt; Could not find com.android.support:appcompat-v7:27.0.2.
       Searched in the following locations:
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.pom
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.jar
           file:/Users/annagarcia/Desktop/projects/Upwork/android/sdk-manager/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.jar
       Required by:
           Upwork:app:unspecified
           Upwork:app:unspecified &gt; com.facebook.react:react-native:0.53.0
     &gt; Could not find com.android.support:appcompat-v7:27.0.2.
       Searched in the following locations:
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.pom
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.jar
           file:/Users/annagarcia/Desktop/projects/Upwork/android/sdk-manager/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.jar
       Required by:
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified &gt; com.facebook.android:facebook-android-sdk:4.30.0 &gt; com.facebook.android:facebook-common:4.30.0
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified &gt; com.facebook.android:facebook-android-sdk:4.30.0 &gt; com.facebook.android:facebook-login:4.30.0
     &gt; Could not find com.android.support:support-annotations:27.0.2.
       Searched in the following locations:
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.2/support-annotations-27.0.2.pom
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.2/support-annotations-27.0.2.jar
           file:/Users/annagarcia/Desktop/projects/Upwork/android/sdk-manager/com/android/support/support-annotations/27.0.2/support-annotations-27.0.2.jar
       Required by:
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified &gt; com.facebook.android:facebook-android-sdk:4.30.0 &gt; com.facebook.android:facebook-core:4.30.0
     &gt; Could not find com.android.support:support-core-utils:27.0.2.
       Searched in the following locations:
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.2/support-core-utils-27.0.2.pom
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.2/support-core-utils-27.0.2.jar
           file:/Users/annagarcia/Desktop/projects/Upwork/android/sdk-manager/com/android/support/support-core-utils/27.0.2/support-core-utils-27.0.2.jar
       Required by:
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified &gt; com.facebook.android:facebook-android-sdk:4.30.0 &gt; com.facebook.android:facebook-core:4.30.0
     &gt; Could not find com.android.support:support-v4:27.0.2.
       Searched in the following locations:
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.2/support-v4-27.0.2.pom
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.2/support-v4-27.0.2.jar
           file:/Users/annagarcia/Desktop/projects/Upwork/android/sdk-manager/com/android/support/support-v4/27.0.2/support-v4-27.0.2.jar
       Required by:
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified &gt; com.facebook.android:facebook-android-sdk:4.30.0 &gt; com.facebook.android:facebook-common:4.30.0
     &gt; Could not find com.android.support:cardview-v7:27.0.2.
       Searched in the following locations:
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.2/cardview-v7-27.0.2.pom
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.2/cardview-v7-27.0.2.jar
           file:/Users/annagarcia/Desktop/projects/Upwork/android/sdk-manager/com/android/support/cardview-v7/27.0.2/cardview-v7-27.0.2.jar
       Required by:
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified &gt; com.facebook.android:facebook-android-sdk:4.30.0 &gt; com.facebook.android:facebook-common:4.30.0
     &gt; Could not find com.android.support:customtabs:27.0.2.
       Searched in the following locations:
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.2/customtabs-27.0.2.pom
           file:/Users/annagarcia/Library/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.2/customtabs-27.0.2.jar
           file:/Users/annagarcia/Desktop/projects/Upwork/android/sdk-manager/com/android/support/customtabs/27.0.2/customtabs-27.0.2.jar
       Required by:
           Upwork:app:unspecified &gt; Upwork:react-native-fbsdk:unspecified &gt; com.facebook.android:facebook-android-sdk:4.30.0 &gt; com.facebook.android:facebook-common:4.30.0
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  </code></pre>