Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
469 views
in Technique[技术] by (71.8m points)

android - Cannot resolve symbol Theme, ThemeOverlay

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'
    }
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

1)Close the project from the File menu.

2)Open the project again as existing Android Studio project.

enter image description here

This fix my problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...