Close the project and import it again. Worked for me today.
Close and reopen project as existing Android Studio project
The support library is out of sync.
This error happens because the support library gets out of sync with your project. To get it back in sync you can do the following steps:
- Open your app module’s build.gradle file
Comment out the
implementationlines for the support library. For me it looks like this:
//implementation 'com.android.support:appcompat-v7:27.1.1' //implementation 'com.android.support:recyclerview-v7:27.1.1' //implementation 'com.android.support.constraint:constraint-la
Sync your project with gradle. You will have some errors now. Don’t worry about that.
implementationlines that you previously commented out.
implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:recyclerview-v7:27.1.1' implementation 'com.android.support.constraint:constraint-la
Sync your project with gradle again.
The “Cannot Resolve Symbol” error should be gone now. This has worked for me several times on different projects.
- If your project has multiple modules, then you need to follow the directions above for all of the modules at once.