Montag, 6. August 2018

AndroidStudio: Solution for Cannot resolve symbol AppCompatActivity


If we use the following version of com.android.support:appcompat-v7 in app/build.gradle:
    dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support:appcompat-v7:25.4.0'
    }
we need to add this to build.gradle
    allprojects {
      //...
      repositories {
        jcenter()
        google()
      }
    }