[Android Studio] SDK 경로 에러

Minjun Kim·2023년 7월 26일
0

Android

목록 보기
1/47
post-thumbnail
  • 최신화를 위해 origin/dev 브랜치 를 따왔는데 run이 에러가 났다.

SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file...

또 먼 개같은 이상한 에러가 나버렸따...

  • 경고문과 구글링으로 local.properties 파일 의 Sdk 경로 불일치 이슈란 것을 알았다.

  • 이슈 발생 원인은 Android Studio 기본 설치 경로 가 Windows와 macOS이 서로 다르기 때문 (팀장님이 mac 사용자인 듯 하다.)

  - Windows 기본 경로 : C:\Users\'사용자 이름'\AppData\Local\Android\Sdk

  - macOS 기본 경로 : /Users/'사용자 이름'/Library/Android/Sdk

  • local.propertiessdk.dir= 경로를 알맞게 수정해주자
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=c\:\\Users\\kim\\AppData\\Local\\android\\Sdk

23/07/28 추가

  • 우측 상단 SDK Manager를 클릭해서 로컬 경로를 확인할 수 있다. 복붙 해주자.
profile
응애 나 아기 뉴비

0개의 댓글