민희의 코딩일지

[Android] A problem occurred configuring project ':app'. > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your.. 본문

Android

[Android] A problem occurred configuring project ':app'. > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your..

heehminh 2022. 1. 22. 08:51
반응형

A problem occurred configuring project ':app'. > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your.. 

sdk.dir 을 설정해주었음에도 이런 오류가 떴음

문제는 업데이트된 버전의 안드로이드스튜디오를 사용하며 협업할 때는 ANDROID_SDK_ROOT를 설정해주어야 한다는 것.

 

1. 시스템 환경 변수 설정

시스템 속성 -> 고급 -> 환경변수 

USER에 대한 사용자 변수(U)와 시스템 변수(S)에 추가

오류로 안열리는 안드로이드스튜디오 파일을 지워주고, 다시 clone

 

2. local_properties에서 sdk.dir 작성

USER 부분에 해당하는 PC의 이름을 작성해주는 것

해당 예시는 윈도우 버전이고, 맥 버전은 작성법이 약간 다름

 

-> 오류 해결! 

반응형
Comments