Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 안드로이드 레트로핏 사용법
- rxjava hot observable
- 2022 플러터 안드로이드 스튜디오
- 스택 큐 차이
- 안드로이드 os 구조
- 안드로이드 유닛 테스트 예시
- 스택 자바 코드
- ANR이란
- 서비스 쓰레드 차이
- 서비스 vs 쓰레드
- android ar 개발
- 안드로이드 레트로핏 crud
- Rxjava Observable
- jvm 작동 원리
- 큐 자바 코드
- 안드로이드 라이선스 종류
- 안드로이드 라이선스
- android retrofit login
- rxjava disposable
- rxjava cold observable
- 자바 다형성
- 안드로이드 유닛테스트란
- 멤버변수
- 클래스
- 안드로이드 유닛 테스트
- jvm이란
- 객체
- 플러터 설치 2022
- 2022 플러터 설치
- ar vr 차이
Archives
- Today
- Total
나만을 위한 블로그
[React-Native] 안드로이드 빌드 시 SDK location not found 에러 해결 본문
728x90
반응형
이 에러의 원문은 아래와 비슷한 형태일 것이다.
BUILD FAILED in 10s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at 'C:\Users\user\Desktop\develop\myproject\android\local.properties'. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 10s.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
아마 이 에러는 Expo가 아닌 리액트 네이티브 CLI로 프로젝트를 만들고 즉시 안드로이드 기기에서 빌드했을 때 가장 많이 발생하는 에러가 아닐까 싶다.
저 내용을 번역하면 아래와 같다.
SDK 위치가 발견되지 않았다. ANDROID_HOME 환경변수를 설정하거나 프로젝트의 로컬 종속 파일에서 sdk.dir 경로를 설정해 유효한 SDK 위치를 지정하라
다행히 해결법이 적혀 있다. ANDROID_HOME 환경변수를 설정하지 않았다면 설정하면 되고, 그게 아니라면 sdk.dir 경로를 설정하면 된다.
이미 안드로이드 스튜디오로 만든 프로젝트가 있다면 그 프로젝트의 local.properties에 있는 sdk.dir 부분을 복사한다.
그리고 리액트 네이티브 프로젝트의 android 폴더에 local.properties 폴더를 만든 다음 npm 또는 yarn 명령어로 안드로이드에 빌드하면 성공한다.
반응형
'React Native' 카테고리의 다른 글
[React-Native] 컴포넌트에 스타일 추가하는 법 (0) | 2025.06.07 |
---|---|
[React-Native] State vs Props (0) | 2025.06.03 |
[React-Native] View란? (0) | 2025.05.25 |
[React-Native] Failed to build ios project. "xcodebuild" exited with error code '65'. 에러 수정 (0) | 2025.05.25 |
[React-Native] 맥북 M2 Pro에 리액트 네이티브 환경설정하기 (2025 업데이트) (0) | 2025.05.25 |
Comments