# 환경구축 ## chocolatey 설치 chocolatey 는 윈도우에서 사용하는 패키지 매니저입니다. https://chocolatey.org/ 에 접속해서 설치방법을 확인합니다. ![](https://goo.gl/KFaPDj) 관리자 권한으로 커맨드창을 실행합니다. ```shell @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" ``` 스크립트를 실행하여 chocolatey를 설치합니다. ## nodejs, python2, jdk8 설치 choco 명령어로 패키지들을 설치합니다. 관리자 권한으로 커맨드창을 열어서 아래 명령어를 실행합니다. ```shell choco install -y nodejs.install python2 jdk8 ``` ## react-native-cli 설치 `react-native-cli`를 설치합니다. 커맨드창을 열어서 아래 명령어를 실행합니다. ```shell npm install -g react-native-cli ``` ## 안드로이드 개발 환경 구성 1. 안드로이드 스튜디오를 설치합니다. 2. 안드로이드 SDK를 설치합니다. 3. `ANDROID_HOME` 환경 변수를 설정합니다. ## 새로운 어플리케이션 만들어보기 커맨드창을 열어서 아래 명령어를 실행합니다. ```shell react-native init AwesomeProject ``` ## 안드로이드 장치 준비 에뮬레이터를 실행합니다. ## React-Native 실행 커맨드창을 열어서 아래 명령어를 실행합니다. ```shell cd AwesomeProject react-native run-android ``` ## git 설치 https://git-scm.com/ 에서 다운로드 받아서 git을 설치합니다. ![](https://goo.gl/6U5HtF) ## 참고 - https://facebook.github.io/react-native/docs/getting-started.html - https://react.parts/native [Getting Started](https://facebook.github.io/react-native/docs/getting-started.html)을 보고 따라하시는 경우에는 Quick Start 의 내용이 쉽지만, 앱을 만들어서 올릴때에는 변경작업이 필요하므로, 처음부터 `Building Projects with Native Code` 의 내용으로 진행하는 것이 좋습니다. ![](https://goo.gl/DKSHdB)