Unable to import AppCompatActivity

I sent my application from GCM to Firebase for push notifications that included changing some dependencies. I changed the gcm dependency to firebase and tried to synchronize projec, but after synchronization, I found that all my classes that implemented AppCompatActivity were not able to resolve AppCompatActivity, and the import statement was grayed out.

enter image description here

I have never had problems with AppCompatActivity before, and I know that AndroidStudio is sometimes an error, so I assume this is an AS problem and not what I am doing wrong. Here are my dependencies:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.android.support:recyclerview-v7:21.0.3'
    compile 'com.android.support:cardview-v7:21.0.+'
    compile 'com.mcxiaoke.volley:library:1.0.+'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    compile 'com.google.firebase:firebase-messaging:9.0.0'
}

I tried cleaning and rebuilding the project several times, restarting AS ... no luck.

+4
1

21.0. + 24.2.1.

+1

Source: https://habr.com/ru/post/1659292/


All Articles