title: How to add appcompat in gradle?
body: <pre><code>Could not find com.android.support:appcompat-v7:24.2.1.
  Searched in the following locations:
    - https://jcenter.bintray.com/com/android/support/appcompat-v7/24.2.1/appcompat-v7-24.2.1.pom
  If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
  Required by:
      project :app
  </code></pre>
  <p>Here the <code>build.gradle</code>:</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 30
      buildToolsVersion &quot;24.0.3&quot;
      useLibrary  'org.apache.http.legacy'
  
      defaultConfig {
          applicationId &quot;com.rts.dcmote.dcmote&quot;
          minSdkVersion 15
          targetSdkVersion 30
          versionCode 2
          versionName &quot;1.1&quot;
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
  
      //noinspection GradleCompatible
      implementation 'com.android.support:appcompat-v7:24.2.1'
  
  }
  </code></pre>