뚱땅뚱땅

[Android Studio] ‘cannot resolve symbol’ error 본문

아카이브

[Android Studio] ‘cannot resolve symbol’ error

양순이 2020. 2. 13. 08:05
728x90

During the Android project, I’ve frequently got ‘cannot resolve the symbol’ error. A bunch of variables of the standard library was red and the auto-completion had stopped working. So, I’m going to write about how I solved my problem.

 

<Method 1> Clean project -> rebuild project

Try this method first. It is very simple but effective. Click ‘Clean Project’ , and then ‘Rebuild project’.

 

<Method 2> sync project with gradle files

Once the code doesn’t match with gradle sync, errors occur during the build.

 

<Method 3>invalidate caches/restart

It might take some time but restarting project and invalidating caches is one method of ensuring to solve the problem.

 

<Method 4> make new project

 

If you cannot solve the problem by 1~3 solutions, you have no choice but make a new project. Unfortunately, I made a new project at last, but the good thing is I solved the problem. So, I want to say that you don’t have to feel frustrated if you have some errors like me. Just make a new project and copy and paste the code carefully!

728x90
Comments