title: Could not get unknown property 'resolutionStrategy' for project ':app' of type org.gradle.api.Project
body: <p>I was getting this error:</p>
  
  <p>Error:Execution failed for task ':app:preDebugBuild'.</p>
  
  <blockquote>
    <p>Android dependency 'com.android.support:appcompat-v7' has different version for the compile (25.3.1) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution</p>
  </blockquote>
  
  <p>A quick search on google showed me that I should include in my app/build.gradle:</p>
  
  <pre><code> resolutionStrategy.eachDependency { details -&gt;
      if (details.requested.group == 'com.android.support'
              &amp;&amp; !details.requested.name.contains('multidex') ) {
          details.useVersion "25.3.1"
      }
  }
  </code></pre>
  
  <p>Now I get a new error:</p>
  
  <pre><code>Could not get unknown property 'resolutionStrategy' for project ':app' of type org.gradle.api.Project.
  </code></pre>
  
  <p>here is my full app/build.gradle code:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 27
      buildToolsVersion '27.0.3'
  
  
      dexOptions {
          preDexLibraries = false
      }
  
      defaultConfig {
          applicationId "co.test.Test"
          minSdkVersion 26
          targetSdkVersion 27
          versionCode 1
          versionName "1.0"
          multiDexEnabled true
  
  
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
  
  repositories {
      flatDir {
          dirs 'libs'
          maven { url "http://dl.bintray.com/chat-sdk/chat-sdk-android" }
          google()
          maven { url "https://jitpack.io" }
          mavenLocal()
  
  
      }
  
  
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
  }
  }
  
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation project(':library')
  
      implementation 'co.chatsdk.chatsdk:chat-sdk-core:4.0.8'
      implementation 'co.chatsdk.chatsdk:chat-sdk-ui:4.0.8'
      implementation 'co.chatsdk.chatsdk:chat-sdk-firebase-adapter:4.0.8'
      implementation 'co.chatsdk.chatsdk:chat-sdk-firebase-file-storage:4.0.8'
  
  }
  
  resolutionStrategy.eachDependency { details -&gt;
      if (details.requested.group == 'com.android.support'
              &amp;&amp; !details.requested.name.contains('multidex') ) {
          details.useVersion "25.3.1"
      }
  }
  
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>my library/build.gradle:</p>
  
  <pre><code>android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
  
      defaultConfig {
          minSdkVersion 16
          targetSdkVersion 27
          versionCode 1
          versionName "1.0"
          multiDexEnabled true
          ndk {
              abiFilters "armeabi-v7a", "x86", "armeabi", "mips"
          }
  
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:27.1.0'
      implementation files('libs/aacdecoder-android-0.8.jar')
  
  
  
  }
  </code></pre>