맥OS 리액트 네이티브 UIExplorer 빌드 편집하기

경고: 로그인하지 않았습니다. 편집을 하면 IP 주소가 공개되게 됩니다. 로그인하거나 계정을 생성하면 편집자가 사용자 이름으로 기록되고, 다른 장점도 있습니다.

편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.

최신판 당신의 편집
2번째 줄: 2번째 줄:
;맥OS 리액트 네이티브 UIExplorer 빌드
;맥OS 리액트 네이티브 UIExplorer 빌드


==안드로이드 SDK 설치==
<source lang='console'>
* 안드로이드 스튜디오 --- Configure --- SDK Manager --- SDK Tools --- 23.0.1 설치
zeta-iMac:workspace testuser$ git clone https://github.com/facebook/react-native.git
 
==안드로이드 NDK 설치==
* https://developer.android.com/ndk/downloads/older_releases.html#ndk-10c-downloads 접속
* android-ndk-r10e-darwin-x86_64.zip 클릭하여 다운로드, 압축해제
 
<syntaxhighlight lang='console'>
zeta-iMac:~ testuser$ mv Downloads/android-ndk-r10e Library/
zeta-iMac:~ testuser$ vi .bash_profile
</syntaxhighlight>
<syntaxhighlight lang='bash'>
export ANDROID_HOME=${HOME}/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export ANDROID_NDK=${HOME}/Library/android-ndk-r10e
</syntaxhighlight>
<syntaxhighlight lang='console'>
zeta-iMac:~ testuser$ source .bash_profile
zeta-iMac:~ testuser$ env | grep ANDROID
ANDROID_HOME=/Users/testuser/Library/Android/sdk
ANDROID_NDK=/Users/testuser/Library/android-ndk-r10e
</syntaxhighlight>
 
==git clone==
<syntaxhighlight lang='console'>
zeta-iMac:~ testuser$ cd Desktop
zeta-iMac:Desktop testuser$ git clone https://github.com/facebook/react-native.git
Cloning into 'react-native'...
Cloning into 'react-native'...
remote: Counting objects: 134063, done.
remote: Counting objects: 134063, done.
35번째 줄: 10번째 줄:
Receiving objects: 100% (134063/134063), 118.89 MiB | 1.28 MiB/s, done.
Receiving objects: 100% (134063/134063), 118.89 MiB | 1.28 MiB/s, done.
Resolving deltas: 100% (92316/92316), done.
Resolving deltas: 100% (92316/92316), done.
</syntaxhighlight>
</source>
 
<source lang='console'>
==npm install==
zeta-iMac:workspace testuser$ cd react-native/Examples/UIExplorer/android/app/
<syntaxhighlight lang='console'>
zeta-iMac:Desktop testuser$ cd react-native
zeta-iMac:react-native testuser$ npm install
</syntaxhighlight>
 
==키 생성 및 설정==
<syntaxhighlight lang='console'>
zeta-iMac:react-native testuser$ cd Examples/UIExplorer/android/app/
zeta-iMac:app testuser$ keytool -genkey -v -keystore production.keystore -alias jmnote -keyalg RSA -keysize 2048 -validity 10000
zeta-iMac:app testuser$ keytool -genkey -v -keystore production.keystore -alias jmnote -keyalg RSA -keysize 2048 -validity 10000
키 저장소 비밀번호 입력:   
키 저장소 비밀번호 입력:   
69번째 줄: 36번째 줄:
(키 저장소 비밀번호와 동일한 경우 Enter 키를 누름):   
(키 저장소 비밀번호와 동일한 경우 Enter 키를 누름):   
[production.keystore을(를) 저장하는 중]
[production.keystore을(를) 저장하는 중]
</syntaxhighlight>
</source>
<syntaxhighlight lang='console'>
<source lang='console'>
zeta-iMac:app testuser$ ls
zeta-iMac:app testuser$ ls
BUCK gradle.properties proguard-rules.pro src
BUCK gradle.properties proguard-rules.pro src
build.gradle production.keystore react.gradle
build.gradle production.keystore react.gradle
</syntaxhighlight>
</source>
<syntaxhighlight lang='console'>
<source lang='console'>
zeta-iMac:app testuser$ vi gradle.rpoperties
zeta-iMac:app testuser$ vi gradle.rpoperties
</syntaxhighlight>
</source>
<syntaxhighlight lang='ini'>
<source lang='ini'>
android.useDeprecatedNdk=true
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
84번째 줄: 51번째 줄:
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****
</syntaxhighlight>
</source>
<syntaxhighlight lang='ini' highlight='2-5'>
<source lang='ini' highlight='2-5'>
android.useDeprecatedNdk=true
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=production.keystore
MYAPP_RELEASE_STORE_FILE=production.keystore
91번째 줄: 58번째 줄:
MYAPP_RELEASE_STORE_PASSWORD=P@ssw0rd
MYAPP_RELEASE_STORE_PASSWORD=P@ssw0rd
MYAPP_RELEASE_KEY_PASSWORD=P@ssw0rd
MYAPP_RELEASE_KEY_PASSWORD=P@ssw0rd
</syntaxhighlight>
</source>
 
<source lang='console'>
==빌드 및 실행==
<syntaxhighlight lang='console'>
zeta-iMac:app testuser$ cd ../../../../
zeta-iMac:app testuser$ cd ../../../../
zeta-iMac:react-native testuser$ ./gradlew :Examples:UIExplorer:android:app:installRelease
zeta-iMac:react-native testuser$ vi .zprofile
Downloading https://services.gradle.org/distributions/gradle-2.14.1-all.zip
</source>
... (생략)
* https://developer.android.com/ndk/downloads/index.html 에서 android-ndk-r14b-darwin-x86_64.zip 다운로드
:Examples:UIExplorer:android:app:assembleRelease
:Examples:UIExplorer:android:app:installRelease FAILED
 
FAILURE: Build failed with an exception.
 
* What went wrong:
Execution failed for task ':Examples:UIExplorer:android:app:installRelease'.
> com.android.builder.testing.api.DeviceException: No connected devices!
 
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
 
BUILD FAILED
 
Total time: 6 mins 0.188 secs
</syntaxhighlight>
 
[[분류: React Native]]

제타위키에서의 모든 기여는 크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0 라이선스로 배포된다는 점을 유의해 주세요(자세한 내용에 대해서는 제타위키:저작권 문서를 읽어주세요). 만약 여기에 동의하지 않는다면 문서를 저장하지 말아 주세요.
또한, 직접 작성했거나 퍼블릭 도메인과 같은 자유 문서에서 가져왔다는 것을 보증해야 합니다. 저작권이 있는 내용을 허가 없이 저장하지 마세요!

취소 편집 도움말 (새 창에서 열림)