title: compileSdkVersion is not specified error in React Native Android
body: <p>I get the build error when I try to build an Android app in my React Native project.</p>
  
  <p>When I run <code>react-native run-android</code>, it says:</p>
  
  <pre><code>&gt; Configure project :react-native-os
  WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
  It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring project ':react-native-os'.
  &gt; compileSdkVersion is not specified.
  </code></pre>
  
  <p>In Android Studio, I can see that it says the same thing:
  <code>Cause: compileSdkVersion is not specified.</code></p>
  
  <p>So I edited build.gradle(Module: app) file in Android Studio, but the problem persists and the error message doesn't change. </p>
  
  <pre><code>android {
  //    compileSdkVersion rootProject.ext.compileSdkVersion
      compileSdkVersion 28
      buildToolsVersion "28.0.3"
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  </code></pre>
  
  <p>I tried solutions in other threads like <a href="https://stackoverflow.com/questions/52487859/cause-compilesdkversion-is-not-specified">this one</a> but nothing worked. Does anyone know what the problem is here? </p>