[Android] unresolved reference: 에러 해결

김민주·2022년 10월 14일
1

Android

목록 보기
2/21

안드로이드 스튜디오에서 unresolved 에러가 난다면

보통 id를 참조하려는데

kotlin-android-extensions 라이브러리

Build.gradle에 플러그인 하지 않았기 때문일 것인데..




나는 라이브러리를 필요로 하지도 않는데 떡하니 빨간줄로 오류가 났다.

unresolved reference: lazy

왜 쓸 수 없는건데...?




그냥 안스에서 File


Invalidate cache and restart 버튼을 눌러주고 재시작하면,

캐시가 삭제되어 쓸 수 있게 된다



 private val binding : ActivityMainBinding by lazy {

재시작으로만으로 안되는 이해못할 에러가 있다면 캐시를 삭제해보세요....

하하^^

profile
𝐃𝐨𝐧'𝐭 𝐛𝐞 𝐚 𝐩𝐫𝐨𝐜𝐫𝐚𝐬𝐭𝐢𝐧𝐚𝐭𝐨𝐫💫

3개의 댓글

comment-user-thumbnail
2024년 4월 28일

감사합니다

답글 달기
comment-user-thumbnail
2025년 8월 23일

it is really fine together with meanful. it is really amazing webpage. Back linking may be very important idea. you will have extremely improved lots of individuals what person see webpage and provides him or her usefull material. 79club

답글 달기
comment-user-thumbnail
4일 전

her in fact awesome blog page. her realy content rich and then a this fantastic profession. i prefer this unique. women underwear uae

답글 달기