1.Node.js 설치
Node.js — 어디서든 JavaScript를 실행하세요
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
2. Chocolatey 설치
https://chocolatey.org/install
Installing Chocolatey
Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages. Chocolatey integrates w/SCCM, Puppet, Chef, etc. Chocolatey is trusted by businesses to manage software deployments.
chocolatey.org
저 부분을 복사한 뒤 PowerShell을 관리자 권한으로 실행한 다음 입력해준다.
3. Android Studio 설치
https://developer.android.com/studio?hl=ko
Android 스튜디오 및 앱 도구 다운로드 - Android 개발자 | Android Studio | Android Developers
Android Studio provides app builders with an integrated development environment (IDE) optimized for Android apps. Download Android Studio today.
developer.android.com
1) 설치 후 안드로이드 스튜디오 실행.
2) virtual Device Manager 클릭 후 Pixel 5 선택.
3) 34, 33 모두 설치
4) SDK Manager 설치
안드로이드 13, 14, 15 설치를 했으며 모두 이미지와 같이 체크함.
우측 하단에 Show Package Details를 누르면 이미지처럼 체크박스 선택이 가능.
5) SDK Tools
4. openjdk 설치 (17 권장)
https://reactnative.dev/docs/set-up-your-environment
Set Up Your Environment · React Native
In this guide, you'll learn how to set up your environment, so that you can run your project with Android Studio and Xcode. This will allow you to develop with Android emulators and iOS simulators, build your app locally, and more.
reactnative.dev
5. React Native 설치
https://reactnative.dev/docs/getting-started-without-a-framework
Get Started Without a Framework · React Native
If you have constraints that are not served well by a Framework, or you prefer to write your own Framework, you can create a React Native app without using a Framework.
reactnative.dev
6. 안드로이드 스튜디오 환경변수 설정
환경변수 > 새로만들기 > 변수이름에 ANDROID_HOME
C:\Users\${사용자이름}\AppData\Local\Android\Sdk
Path > 편집 > %ANDROID_HOME%\platform-tools 추가
참고로 시스템 변수에다가 등록하는 것이 아닌, 사용자 변수에 추가해야함.
주의사항
사용자 이름이 한글인 경우 (예를 들어서 C:\Users\홍길동\AppData\Local\Android\Sdk 이렇게 돼있을 경우 에뮬레이터 실행이 안 되는 오류가 발생함.
npx react-native run-android 를 입력해도 실행이 안 되고, 안드로이드 스튜디오에서 직접 실행해도 안 되는 경우가 있음. ( The emulator process for AVD has terminated 오류 발생)
따라서 사용자 이름을 영어로 바꾸고, 폴더명도 레지스트를 수정해서 영어로 바꿔주어야함.