title: OpenCV setup - "plugin with id 'com.android.library' not found"
body: <p>I'm pretty new to Android development (and gradle). I'm trying to set up the openCV sdk within a new project. The code in the Application/build.gradle file is as follows:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
  
      defaultConfig {
          minSdkVersion 21
          targetSdkVersion 27
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  }
  </code></pre>
  
  <p>The opencv/build.gradle is:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
  
      defaultConfig {
          minSdkVersion 21
          targetSdkVersion 27
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  }
  </code></pre>
  
  <p>And the settings.gradle is: </p>
  
  <pre><code>include 'Application'
  include ':opencv'
  </code></pre>
  
  <p>I get the error in the title when I try to sync the project. Any explanation or help is appreciated. I've looked at a few other similar threads and tried some suggestions in them but nothings worked so far. Thanks!</p>