Cute Apple
본문 바로가기
개발/Android

[Android] Unsolved reference

by 미댕댕 2022. 8. 15.

사이드 프로젝트를 진행하다가 갑자기 잘만 되던 프로젝트가 Unresolved reference 를 만났다....ㄷㄷ

 

 

인터넷을 찾아보다가 찾아본 방법

 

시도 1

Build > Clean Project from the Android Studio toolbar, wait a few moments, and then build your project by selecting Build > Rebuild Project.

 

시도2

File > Invalidate Caches / Restart > Invalidate and Restart

 

 

 

이러고 나서도 왜안되지 하다가

import 를 확인해보니

import android.R

얘 뭐야...❓❓ 이상한 import 가 들어있었따..!

결국 삭제하니까 되더라니...

 

강제로 눌러서 import 했을때 자동으로 import 되었나보다..

결국 그래도 엥간하면 위의 2가지 방법으로 해결이 된다니까  해볼것..!

 

 

참고

https://teamnova0410-dev.tistory.com/2

https://stackoverflow.com/questions/16045118/cannot-find-r-layout-activity-main

반응형

'개발 > Android' 카테고리의 다른 글

[Android] Manifest Error(Merging Errors)  (0) 2022.08.17
[Android] Database Inspector  (0) 2022.08.16
[Android] Coroutines vs Thread  (0) 2022.08.13
[Android] PendingIntent 와 getBroadcast()  (0) 2022.08.11
[Android] ExoPlayer2 사용기  (0) 2022.08.10

댓글