After changing the name of the android studio folder, such as example to demo, Cannot resolve symbol 'R appears

When debugging today, Android Studio reported an inexplicable error that Cannot resolve symbol ‘R’made people feel overwhelmed. Because this thing is not under my control at all, how could  Cannot resolve symbol this kind of error occur?

Googled a bit and found the solution as follows: 

Build -> Clean Project
Tools -> Android -> Sync Project With Gradle Files

Guess you like

Origin blog.csdn.net/xss12322/article/details/124857586