title: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve androidx
body: <p>I'm working on the android app it's too big projects with many class but today I'm trying to create a new class then I just got this code:</p>
  
  <pre><code>import androidx.appcompat.app.AppCompatActivity;
  
  import android.os.Bundle;
  
      public class Main2Activity extends AppCompatActivity {
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main2);
          }
      }
  </code></pre>
  
  <p>you can see this line:</p>
  
  <p><strong>import androidx.appcompat.app.AppCompatActivity;</strong></p>
  
  <p>the <strong>appcompat</strong> is in red color </p>
  
  <p>while the old classes all have this line instead:</p>
  
  <p><strong>import android.support.v7.app.AppCompatActivity;</strong></p>
  
  <p>and the xml code like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".Main2Activity"&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>you can see the androidx too
  I tried to delete the class and create it again and tried to create new fragment instead class but all created with x</p>
  
  <p>before some days I update the library from 27 to 28 I don't know if this cause to this problem
  now I can't sync project I just got these errors:</p>
  
  <blockquote>
    <p>Unable to resolve dependency for ':app@debug/compileClasspath': Could
    not resolve androidx.constraintlayout:constraintlayout:1.1.2. Open
    File Show Details</p>
    
    <p>Unable to resolve dependency for
    ':app@debugAndroidTest/compileClasspath': Could not resolve
    androidx.constraintlayout:constraintlayout:1.1.2. Open-File Show
    Details</p>
  </blockquote>
  
  <p>and this is the app gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      buildToolsVersion "27.0.3"
      defaultConfig {
          applicationId "giga.net.world.GN"
          minSdkVersion 16
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          aaptOptions {
              cruncherEnabled = false
          }
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
      androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
  
      implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
      implementation 'com.android.support:design:28.0.0-alpha1'
      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
      implementation 'com.android.support:cardview-v7:28.0.0-alpha1'
      implementation 'com.android.support:recyclerview-v7:28.0.0-alpha1'
      implementation 'com.squareup.picasso:picasso:2.71828'
      implementation 'com.jakewharton:butterknife:8.8.1'
      implementation 'com.roughike:bottom-bar:2.0.2'
      implementation 'com.android.support:palette-v7:28.0.0-alpha1'
      implementation 'com.android.support:support-v4:28.0.0-alpha1'
      testImplementation 'junit:junit:4.12'
      annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
      implementation 'com.android.support:support-core-utils:28.0.0-alpha1'
      implementation 'net.alexandroid.utils:mylog:1.1'
      implementation 'com.google.android.exoplayer:exoplayer:r1.5.16'
      implementation project(':playercontrolview')
  }
  </code></pre>
  
  <p>and the project gradle:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          mavenCentral()
          google()
          maven {
              url "https://maven.google.com"
          }
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.0-alpha02'
          classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
          classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
          classpath 'com.novoda:bintray-release:0.5.0'
  //        classpath 'com.google.gms:google-services:3.0.0'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
          mavenCentral()
          google()
          maven {
              url "https://maven.google.com"
          }
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>and there is also a library project with the main projects and it's gradle is:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  apply plugin: 'com.novoda.bintray-release'
  
  android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
  
      defaultConfig {
          minSdkVersion 16
          targetSdkVersion 27
          versionCode 1
          versionName "1.0.1"
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      lintOptions {
          abortOnError false
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      testImplementation 'junit:junit:4.12'
      implementation 'com.android.support:appcompat-v7:27.1.1'
  }
  
  publish {
      userOrg = 'ogapants'
      groupId = 'com.github.ogapants.playercontrolview'
      artifactId = 'playercontrolview'
      publishVersion = '1.0.1'
      desc = 'This library provides easily customizable MediaController for Android'
      website = 'https://github.com/ogapants/PlayerControlView'
      licences = ['Apache-2.0']
  }
  </code></pre>
  
  <p>when I delete the newly created class or fragment and sync the project again the errors are gone and everything return normal
  what's happened to project?</p>