title: Including OpenCV in Android Studio project yields 'Unresolved dependencies' error
body: <p>I'm trying to include OpenCV in my Android Studio project using <a href="https://stackoverflow.com/a/27421494/7097579">this</a> step by step guide. However, after adding OpenCV as module dependency (step 4 in the guide) the Gradle project sync fails with the following errors:</p>
  
  <pre><code>ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :openCVLibrary410.
  Show Details
  Affected Modules: app
  
  
  ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :openCVLibrary410.
  Show Details
  Affected Modules: app
  
  
  ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :openCVLibrary410.
  Show Details
  Affected Modules: app
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/46949622/android-studio-3-0-unable-to-resolve-dependency-for-appdexoptions-compileclas">this related question</a> and tried adjusting the buildTypes in the openCV build.gradle by adding a debug field, but it did not change anything. I also tried to adjust the app's build.gradle as follows</p>
  
  <pre><code>    buildTypes {
          release {
              ...
          }
          debug {
              matchingFallbacks = ['release']
          }
      }
  </code></pre>
  
  <p>(and several slightly different versions of this because I wasn't entirely sure what I was doing there) but none helped. I also tried setting the build variant of the OpenCV library to release instead of debug, but this resulted in the following error:</p>
  
  <pre><code>Unable to find a matching variant of project :openCVLibrary410:
    - Variant 'debugApiElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
        - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'.
        - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
    - Variant 'debugBundleElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' but no value provided.
        - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but no value provided.
        - Required org.gradle.usage 'java-api' and found incompatible value 'android-bundle'.
    - Variant 'debugMetadataElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
        - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Metadata'.
        - Required org.gradle.usage 'java-api' but no value provided.
    - Variant 'debugRuntimeElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
        - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'.
        - Required org.gradle.usage 'java-api' and found incompatible value 'java-runtime'.
    - Variant 'releaseApiElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'release'.
        - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'.
        - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
    - Variant 'releaseBundleElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' but no value provided.
        - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but no value provided.
        - Required org.gradle.usage 'java-api' and found incompatible value 'android-bundle'.
    - Variant 'releaseMetadataElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'release'.
        - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Metadata'.
        - Required org.gradle.usage 'java-api' but no value provided.
    - Variant 'releaseRuntimeElements':
        - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'release'.
        - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
        - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'.
        - Required org.gradle.usage 'java-api' and found incompatible value 'java-runtime'.
  </code></pre>
  
  <p>Any idea how to resolve this?</p>