I updated my android studio to latest version - 3.0.1. Since then it complains 'Cannot resolve symbol' for Theme and ThemeOverlay in the following lines of code. App runs fine but they are marked in RED in the file.
styles.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"></style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
build.gradle is updated with the latest version
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
1)Close the project from the File menu.
2)Open the project again as existing Android Studio project.
This fix my problem.
implementation 'com.android.support:appcompat-v7:27.1.1'
)This will magically solve the problem that for no reason appeared in the 3.0.1
Something got messed up on the indexing of the Project when you updated the version.
To fix go to the menu:
File -> Invalidate Caches/Restart
that will reopen and re-index the whole project, the error should be gone.
The error should be gone.
If(that_did_not_work)
Error Gone!
I had this same error so i compared it to gradle file of another project which wasn't showing error. In your build.gradle(Module:app) under dependencies, add the following line:
implementation 'com.android.support:preference-v7:28.0.0'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With