본문 바로가기
Programing/android

[android studio] Class referenced... Cannot resolve class ... 오류 해결

by TEXTBOX 2021. 11. 10.
728x90

한번씩 android studio를 쓰다보면 프로젝트가 기존에 없었던 오류로 
빨간 줄들이 막 생겨나는 경우가 있다.

Class referenced in the layout file, `com.sothree.slidinguppanel.SlidingUpPanelLayout`, was not found in the project or the libraries

Cannot resolve class com.sothree.slidinguppanel.SlidingUpPanelLayout

이와 비슷한 오류로 Class referenced in the layout file... Cannot resolve class...로 시작하는 해당 class를 찾을 수 없다고 빨간 줄들이 막 끄여버리는 경우가 있다.

1번 해결책

Build > Clean Project
Build > Rebuild Project

순으로 실행해 준다.

 

2번 해결책

1번으로 해결이 안된다면 [File > Invalidate Caches/Restart...]를 실행 해 준다.
보통 1번 혹은 2번까지 해보면 정상적으로 돌아 왔다.

 

끝~~

728x90

댓글