title: A problem occurred evaluating project ':app'. possibly build.gradle problem
body: <p>I keep getting this error:</p>
  
  <blockquote>
    <p>A problem occurred configuring project ':app'.</p>
  </blockquote>
  
  <p>whenever I do react-native run-android. My suspicion is I screwed up something in one of the two build.gradle(s)</p>
  
  <p>Error log: (cmd)</p>
  
  <pre><code>FAILURE: Build completed with 2 failures.
  
  1: Task failed with an exception.
  -----------
  * Where: Build file 'D:\Programs\reactnative\tokobangun\android\app\build.gradle' line:
  103
  
  * What went wrong: A problem occurred evaluating project ':app'.
  Could not find method android() for arguments [build_52alt8ebvpuajag0a3orrbaix$_run_closure1@36f24a11] on project
  ':app' of type org.gradle.api.Project.
  ==============================================================================
  
  2: Task failed with an exception.
  -----------
  * What went wrong: A problem occurred configuring project ':app'.
  Failed to notify project evaluation listener.
  Could not get unknown property 'android' for project ':app' of type org.gradle.api.Project.
  Could not get unknown property 'android' for project ':app' of type org.gradle.api.Project.
  </code></pre>
  
  <p>I tried:</p>
  
  <ol>
  <li><p>react-native run-android</p></li>
  <li><p>gradlew clean</p></li>
  </ol>
  
  <p>Both give me same results.</p>
  
  <p>android/app/build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
      }
      dependencies {
          classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
      }
  }
  
  apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
  
  /** . . . */
  
  project.ext.react = [
      entryFile: "index.js"
  ]
  
  apply from: "../../node_modules/react-native/react.gradle"
  
  /**. . . */
  def enableSeparateBuildPerCPUArchitecture = false
  
  /**
   * Run Proguard to shrink the Java bytecode in release builds.
   */
  def enableProguardInReleaseBuilds = false
  
  android {
      compileSdkVersion rootProject.ext.compileSdkVersion
  
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  
      defaultConfig {
          applicationId "com.tokobangun"
          minSdkVersion rootProject.ext.minSdkVersion
          targetSdkVersion rootProject.ext.targetSdkVersion
          versionCode 1
          versionName "1.0"
      }
      splits {
          abi {
              reset()
              enable enableSeparateBuildPerCPUArchitecture
              universalApk false  // If true, also generate a universal APK
              include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
          }
      }
      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, "arm64-v8a": 3, "x86_64": 4]
              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 {
      implementation project(':react-native-onesignal')
      implementation project(':react-native-webview')
      implementation fileTree(dir: "libs", include: ["*.jar"])
      implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
      implementation "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>
  
  <p>android/build.gradle</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      ext {
          buildToolsVersion = "28.0.3"
          minSdkVersion = 16
          compileSdkVersion = 28
          targetSdkVersion = 28
          supportLibVersion = "28.0.0"
      }
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath("com.android.tools.build:gradle:3.4.0")
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          mavenLocal()
          google()
          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>
  
  <p>I do think I screwed up android/build.gradle somewhere, and I tried to bring it back to how it was when it has no errors, but to no avail. Any ideas?</p>
  
  <p>Oh, if you find my question format lacking, kindly tell me so, I'll adjust it as much as I can. Thanks in advances.</p>