"맥OS 리액트 네이티브 UIExplorer 빌드"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(다른 사용자 한 명의 중간 판 18개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;맥OS 리액트 네이티브 UIExplorer 빌드
;맥OS 리액트 네이티브 UIExplorer 빌드
==안드로이드 SDK 설치==
* 안드로이드 스튜디오 --- Configure --- SDK Manager --- SDK Tools --- 23.0.1 설치


==안드로이드 NDK 설치==
==안드로이드 NDK 설치==
* https://developer.android.com/ndk/downloads/index.html 접속
* https://developer.android.com/ndk/downloads/older_releases.html#ndk-10c-downloads 접속
* android-ndk-r14b-darwin-x86_64.zip 다운로드, 압축해제
* android-ndk-r10e-darwin-x86_64.zip 클릭하여 다운로드, 압축해제


<source lang='console'>
<syntaxhighlight lang='console'>
zeta-iMac:~ testuser$ mv Downloads/android-ndk-r14b/ Library/
zeta-iMac:~ testuser$ mv Downloads/android-ndk-r10e Library/
zeta-iMac:~ testuser$ vi .bash_profile
zeta-iMac:~ testuser$ vi .bash_profile
</source>
</syntaxhighlight>
<source lang='bash'>
<syntaxhighlight lang='bash'>
export ANDROID_HOME=${HOME}/Library/Android/sdk
export ANDROID_HOME=${HOME}/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export ANDROID_NDK=${HOME}/Library/android-ndk-r14b
export ANDROID_NDK=${HOME}/Library/android-ndk-r10e
</source>
</syntaxhighlight>
* 터미널 새로 열기
<syntaxhighlight lang='console'>
<source lang='console'>
zeta-iMac:~ testuser$ source .bash_profile
zeta-iMac:~ testuser$ env | grep ANDROID
zeta-iMac:~ testuser$ env | grep ANDROID
ANDROID_HOME=/Users/testuser/android-ndk-r14b
ANDROID_HOME=/Users/testuser/Library/Android/sdk
</source>
ANDROID_NDK=/Users/testuser/Library/android-ndk-r10e
</syntaxhighlight>


==빌드==
==git clone==
<source lang='console'>
<syntaxhighlight lang='console'>
zeta-iMac:workspace testuser$ git clone https://github.com/facebook/react-native.git
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.
30번째 줄: 35번째 줄:
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.
</source>
</syntaxhighlight>
<source lang='console'>
 
zeta-iMac:workspace testuser$ cd react-native/Examples/UIExplorer/android/app/
==npm install==
<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
키 저장소 비밀번호 입력:   
키 저장소 비밀번호 입력:   
56번째 줄: 69번째 줄:
(키 저장소 비밀번호와 동일한 경우 Enter 키를 누름):   
(키 저장소 비밀번호와 동일한 경우 Enter 키를 누름):   
[production.keystore을(를) 저장하는 중]
[production.keystore을(를) 저장하는 중]
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight 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
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
zeta-iMac:app testuser$ vi gradle.rpoperties
zeta-iMac:app testuser$ vi gradle.rpoperties
</source>
</syntaxhighlight>
<source lang='ini'>
<syntaxhighlight lang='ini'>
android.useDeprecatedNdk=true
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
71번째 줄: 84번째 줄:
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****
</source>
</syntaxhighlight>
<source lang='ini' highlight='2-5'>
<syntaxhighlight lang='ini' highlight='2-5'>
android.useDeprecatedNdk=true
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=production.keystore
MYAPP_RELEASE_STORE_FILE=production.keystore
78번째 줄: 91번째 줄:
MYAPP_RELEASE_STORE_PASSWORD=P@ssw0rd
MYAPP_RELEASE_STORE_PASSWORD=P@ssw0rd
MYAPP_RELEASE_KEY_PASSWORD=P@ssw0rd
MYAPP_RELEASE_KEY_PASSWORD=P@ssw0rd
</source>
</syntaxhighlight>
<source lang='console'>
 
==빌드 및 실행==
<syntaxhighlight lang='console'>
zeta-iMac:app testuser$ cd ../../../../
zeta-iMac:app testuser$ cd ../../../../
zeta-iMac:react-native testuser$ vi .zprofile
zeta-iMac:react-native testuser$ ./gradlew :Examples:UIExplorer:android:app:installRelease
</source>
Downloading https://services.gradle.org/distributions/gradle-2.14.1-all.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]]

2020년 11월 2일 (월) 02:54 기준 최신판

1 개요[ | ]

맥OS 리액트 네이티브 UIExplorer 빌드

2 안드로이드 SDK 설치[ | ]

  • 안드로이드 스튜디오 --- Configure --- SDK Manager --- SDK Tools --- 23.0.1 설치

3 안드로이드 NDK 설치[ | ]

zeta-iMac:~ testuser$ mv Downloads/android-ndk-r10e Library/
zeta-iMac:~ testuser$ vi .bash_profile
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
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

4 git clone[ | ]

zeta-iMac:~ testuser$ cd Desktop
zeta-iMac:Desktop testuser$ git clone https://github.com/facebook/react-native.git
Cloning into 'react-native'...
remote: Counting objects: 134063, done.
remote: Compressing objects: 100% (154/154), done.
remote: Total 134063 (delta 272), reused 168 (delta 168), pack-reused 133741
Receiving objects: 100% (134063/134063), 118.89 MiB | 1.28 MiB/s, done.
Resolving deltas: 100% (92316/92316), done.

5 npm install[ | ]

zeta-iMac:Desktop testuser$ cd react-native
zeta-iMac:react-native testuser$ npm install

6 키 생성 및 설정[ | ]

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
키 저장소 비밀번호 입력:  
새 비밀번호 다시 입력: 
이름과 성을 입력하십시오.
  [Unknown]:  jmnote
조직 단위 이름을 입력하십시오.
  [Unknown]:  zeta
조직 이름을 입력하십시오.
  [Unknown]:  zeta
구/군/시 이름을 입력하십시오?
  [Unknown]:  Seoul
시/도 이름을 입력하십시오.
  [Unknown]:  Seoul
이 조직의 두 자리 국가 코드를 입력하십시오.
  [Unknown]:  KR
CN=jmnote, OU=zeta, O=zeta, L=Seoul, ST=Seoul, C=KR이(가) 맞습니까?
  [아니오]:  y

다음에 대해 유효 기간이 10,000일인 2,048비트 RSA 키 쌍 및 자체 서명된 인증서(SHA256withRSA)를 생성하는 중
	: CN=jmnote, OU=zeta, O=zeta, L=Seoul, ST=Seoul, C=KR
<jmnote>에 대한 키 비밀번호를 입력하십시오.
	(키 저장소 비밀번호와 동일한 경우 Enter 키를 누름):  
[production.keystore을(를) 저장하는 중]
zeta-iMac:app testuser$ ls
BUCK			gradle.properties	proguard-rules.pro	src
build.gradle		production.keystore	react.gradle
zeta-iMac:app testuser$ vi gradle.rpoperties
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=production.keystore
MYAPP_RELEASE_KEY_ALIAS=jmnote
MYAPP_RELEASE_STORE_PASSWORD=P@ssw0rd
MYAPP_RELEASE_KEY_PASSWORD=P@ssw0rd

7 빌드 및 실행[ | ]

zeta-iMac:app testuser$ cd ../../../../
zeta-iMac:react-native testuser$ ./gradlew :Examples:UIExplorer:android:app:installRelease
Downloading https://services.gradle.org/distributions/gradle-2.14.1-all.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
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}