Android Studio 3.1 无法解析符号(主题、小部件、属性等) [英] Android Studio 3.1 Cannot Resolve Symbol (Themes, Widget, attr, etc.)
问题描述
我今天将 Android Studio 升级到 3.1,现在 Android Studio 说它无法解析大多数资源的符号(例如 styles.xml
或 中的
).到目前为止,这似乎并没有阻止我在模拟器中构建或运行,但这些错误让我很紧张.ThemeOverlay
>?attr/actionBarSize
I upgraded Android Studio today to 3.1, and now Android Studio says it cannot resolve symbols for most of the resources (for example ThemeOverlay
in styles.xml
or ?attr/actionBarSize
). This doesn't seem to prevent me from building or running in an emulator so far, but these errors are making me nervous.
有没有其他人遇到过这个问题?我该如何解决?我曾尝试同步 gradle 并清理我的项目,但似乎根本没有帮助.
Has anyone else experienced this issue? How can I go about resolving it? I have tried syncing gradle and cleaning my project but it doesn't seem to help at all.
有什么想法吗?
我使用的是 Android Studio 3.1 和 Gradle 4.4 版和 Gradle 插件 3.1.0
I'm using Android Studio 3.1 with Gradle version 4.4 and Gradle Plugin 3.1.0
此问题会影响更新到 Android Studio 3.1.1、3.1.2、3.1.3、3.1.4 以及 Gradle 插件到 3.1.1、3.1.2、3.1.3 和 3.1.4.但是,下面的答案仍然有效.
This issue affects updating to Android Studio 3.1.1, 3.1.2, 3.1.3, 3.1.4 as well as Gradle Plugin to 3.1.1, 3.1.2, 3.1.3, and 3.1.4. However, the answer below still works.
推荐答案
关闭项目并重新导入.今天为我工作.
Close the project and import it again. Worked for me today.
这篇关于Android Studio 3.1 无法解析符号(主题、小部件、属性等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!