본문 바로가기

Mobile

[React Native] expo 프로젝트 build

android

npx expo prebuild

 

android 폴더가 생김

 

android 경로에서 'gradlew.bat assembleRelease' 실행

 

android/app/build/outputs/apk/release 하위에 .apk 파일이 생성됨

 

폴더에 넣고 zip 파일로 압축

 

모바일로 이동

 

압축 해제

 

.apk 설치


오류

WebVeiw 페이지에서 https 관련하여 오류 발생

 

 

prebuild 후 생긴 android 폴더 내에 'android:usesCleartextTraffic="true"' 추가

android/app/src/main/AndroidManifest.xml

 


eas를 사용하는 경우, app.json > plugins 에 아래 내용 추가

* npx expo install expo-build-properties 설치 필요

 

'Mobile' 카테고리의 다른 글

Firebase OAuth2 키 발급  (0) 2024.03.13
[React Native] Deep Linking  (0) 2024.03.05
[React-Native] expo-cli 환경 구축 (eas-cli)  (0) 2024.02.27
.aab -> .apk 변환  (0) 2024.02.22
[React-native] 절대 경로 설정 (expo)  (0) 2024.02.20