Cannot resolve symbol 'xxx' ?

For those who are new to Android Studio, they will definitely encounter various problems, and I also stepped on many pitfalls. Let me tell you about the lowest mistake I ever made.
Look at the picture below:
Insert image description here
Tip: Unable to resolve symbol 'xxx'

I searched a lot on Baidu but couldn't solve my problem. Am I the only one who has this problem? shivering

Finally, I thought about it differently. If it cannot be parsed, it must be because it is not found. If it is not found, it should mean that there is no package containing the Uri class in the import. I pat my head and go, there is no imported package. This kind of error is really too low-level, but it is easy. be ignored.

Solution : the shortcut key for importing the package Alt + Enter

To summarize: When you encounter a problem, change your mind and think more. You may not be aware of a very simple problem, but it becomes complicated. Learn more about the principles.
over

Guess you like

Origin blog.csdn.net/weixin_40307206/article/details/102907610