title: How to fix the "Android MPAndroidChart Could not find method dependencyResolutionManagement() for arguments error in gradle"?
body: <p>well Im trying to use MPAndroidChart library in Android studio
  my gradle version was 7.0.2 but it didnt work well.
  so i changed gradle Version to 6.7.1, and Android Gradle Plugin Version to 4.2.2
  i also changed the version of sdk to Android 11.0(R)
  my Target SDK version is 30</p>
  <p><strong>--build.gradle(project)</strong></p>
  <pre><code>// Top-level build file where you can add configuration options common to all sub-
  
  projects/modules.
  buildscript {
      repositories {
          google()
          mavenCentral()
      }
      dependencies {
          classpath &quot;com.android.tools.build:gradle:4.2.2&quot;
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects{
      repositories{
          google()
          mavenCentral()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  <p><strong>--build.gradle(Module)</strong></p>
  <pre><code>plugins {
      id 'com.android.application'
  }
  
  android {
      compileSdk 31
      BuildToolsVersion '30.0.3'
  
      defaultConfig {
          applicationId &quot;com.example.myapplication&quot;
          minSdkVersion 23
          targetSdkVersion 30
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  }
  repositories{
      maven { url 'https://jitpack.io' }
  }
  dependencies {
  
      implementation 'androidx.appcompat:appcompat:1.3.1'
      implementation 'com.google.android.material:material:1.4.0'
      implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
      testImplementation 'junit:junit:4.+'
      androidTestImplementation 'androidx.test.ext:junit:1.1.3'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
      implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
  }
  </code></pre>
  <p><strong>--setting.gradle</strong></p>
  <pre><code>dependencyResolutionManagement {
      repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
      repositories {
          google()
          mavenCentral()
          jcenter() // Warning: this repository is going to shut down soon
      }
  }
  rootProject.name = &quot;My Application&quot;
  include ':app'
  </code></pre>
  <p><strong>--capture of the bug</strong>
  <a href="https://i.stack.imgur.com/g9NvK.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p><strong>--bug code</strong>
  Settings file 'C:\Users\kimta\AndroidStudioProjects\MyApplication\settings.gradle' line: 1</p>
  <p>A problem occurred evaluating settings 'MyApplication'.</p>
  <blockquote>
  <p>Could not find method dependencyResolutionManagement() for arguments [settings_5pc4jcjs87c9dkfx5manehm0u$_run_closure1@69c68d91] on settings 'MyApplication' of type org.gradle.initialization.DefaultSettings.</p>
  </blockquote>
  <p>gradle problem is too difficult for novice like me. Is there any solution ?</p>