작성
·
43
·
수정됨
0
만들어보고 있는 앱을 실 기기에 설치해서 테스트 해볼 일이 있어 apk 파일을 추출하려 합니다.
백엔드 url이 http 라 app.json android 내에 useClearTextTraffic true 도 추가해주었습니다.
"usesCleartextTraffic": true
eas.json 내 build 에 release 를 추가하였고,
"release": {
"android": {
"buildType": "apk"
}
}
eas build --platform android --profile release 명령어를 통해 빌드 했습니다.
생성된 apk 를 실 기기에 설치 후 실행 했을 때 api 호출을 통해 데이터를 받아와서 뿌려주는 부분에 데이터가 하나도 나오고 있지 않습니다.
설치 된 development build 를 에뮬레이터에서 실행해보아도 마찬가지로 데이터가 하나도 나오지 않고, catch 부분에서 에러도 콘솔에 찍히지 않고 있습니다.ㅠㅠ
npm run android 실행 후 s > a 입력해서 expo go 환경에서 확인해봤을 땐 데이터도 잘 받아와지는데
혹시 어느 부분을 확인해봐야할까요?
npm ls react
├─┬ @expo/vector-icons@14.1.0
│ └── react@19.0.0 deduped
├─┬ @react-native-community/datetimepicker@8.4.1
│ └── react@19.0.0 deduped
├─┬ @react-native-kakao/core@2.4.0
│ └── react@19.0.0 deduped
├─┬ @react-native-kakao/user@2.4.0
│ └── react@19.0.0 deduped
├─┬ @react-navigation/bottom-tabs@7.4.6
│ └── react@19.0.0 deduped
├─┬ @react-navigation/drawer@7.5.7
│ ├─┬ react-native-drawer-layout@4.1.12
│ │ └── react@19.0.0 deduped
│ ├── react@19.0.0 deduped
│ └─┬ use-latest-callback@0.2.4
│ └── react@19.0.0 deduped
├─┬ @react-navigation/elements@2.6.3
│ ├── react@19.0.0 deduped
│ └─┬ use-sync-external-store@1.5.0
│ └── react@19.0.0 deduped
├─┬ @react-navigation/native@7.1.17
│ ├─┬ @react-navigation/core@7.12.4
│ │ └── react@19.0.0 deduped
│ └── react@19.0.0 deduped
├─┬ expo-blur@14.1.5
│ └── react@19.0.0 deduped
├─┬ expo-font@13.3.2
│ └── react@19.0.0 deduped
├─┬ expo-image@2.4.0
│ └── react@19.0.0 deduped
├─┬ expo-linear-gradient@14.1.5
│ └── react@19.0.0 deduped
├─┬ expo-linking@7.1.7
│ └── react@19.0.0 deduped
├─┬ expo-router@5.1.4
│ ├─┬ @radix-ui/react-slot@1.2.0
│ │ ├─┬ @radix-ui/react-compose-refs@1.1.2
│ │ │ └── react@19.0.0 deduped
│ │ └── react@19.0.0 deduped
│ ├─┬ @react-navigation/native-stack@7.3.25
│ │ └── react@19.0.0 deduped
│ └─┬ react-native-is-edge-to-edge@1.2.1
│ └── react@19.0.0 deduped
├─┬ expo-status-bar@2.2.3
│ ├─┬ react-native-edge-to-edge@1.6.0
│ │ └── react@19.0.0 deduped
│ └── react@19.0.0 deduped
├─┬ expo@53.0.20
│ ├─┬ expo-asset@11.1.7
│ │ └── react@19.0.0 deduped
│ ├─┬ expo-keep-awake@14.1.4
│ │ └── react@19.0.0 deduped
│ └── react@19.0.0 deduped
├─┬ react-dom@19.0.0
│ └── react@19.0.0 deduped
├─┬ react-native-gesture-handler@2.24.0
│ └── react@19.0.0 deduped
├─┬ react-native-gifted-charts@1.4.63
│ ├─┬ gifted-charts-core@0.1.65
│ │ └── react@19.0.0 deduped
│ └── react@19.0.0 deduped
├─┬ react-native-reanimated@3.17.5
│ ├─┬ react-native-is-edge-to-edge@1.1.7
│ │ └── react@19.0.0 deduped
│ └── react@19.0.0 deduped
├─┬ react-native-safe-area-context@5.4.0
│ └── react@19.0.0 deduped
├─┬ react-native-screens@4.11.1
│ ├─┬ react-freeze@1.0.4
│ │ └── react@19.0.0 deduped
│ └── react@19.0.0 deduped
├─┬ react-native-svg@15.11.2
│ └── react@19.0.0 deduped
├─┬ react-native-web@0.20.0
│ └── react@19.0.0 deduped
├─┬ react-native-webview@13.13.5
│ └── react@19.0.0 deduped
├─┬ react-native@0.79.5
│ ├─┬ @react-native/virtualized-lists@0.79.5
│ │ └── react@19.0.0 deduped
│ └── react@19.0.0 deduped
└── react@19.0.0
npm ls react-native
├─┬ @expo/vector-icons@14.1.0
│ └── react-native@0.79.5 deduped
├─┬ @react-native-async-storage/async-storage@2.1.2
│ └── react-native@0.79.5 deduped
├─┬ @react-native-community/datetimepicker@8.4.1
│ └── react-native@0.79.5 deduped
├─┬ @react-native-kakao/core@2.4.0
│ └── react-native@0.79.5 deduped
├─┬ @react-native-kakao/user@2.4.0
│ └── react-native@0.79.5 deduped
├─┬ @react-navigation/bottom-tabs@7.4.6
│ └── react-native@0.79.5 deduped
├─┬ @react-navigation/drawer@7.5.7
│ ├─┬ react-native-drawer-layout@4.1.12
│ │ └── react-native@0.79.5 deduped
│ └── react-native@0.79.5 deduped
├─┬ @react-navigation/elements@2.6.3
│ └── react-native@0.79.5 deduped
├─┬ @react-navigation/native@7.1.17
│ └── react-native@0.79.5 deduped
├─┬ expo-apple-authentication@7.2.4
│ └── react-native@0.79.5 deduped
├─┬ expo-blur@14.1.5
│ └── react-native@0.79.5 deduped
├─┬ expo-constants@17.1.7
│ └── react-native@0.79.5 deduped
├─┬ expo-image@2.4.0
│ └── react-native@0.79.5 deduped
├─┬ expo-linear-gradient@14.1.5
│ └── react-native@0.79.5 deduped
├─┬ expo-linking@7.1.7
│ └── react-native@0.79.5 deduped
├─┬ expo-router@5.1.4
│ ├─┬ @expo/metro-runtime@5.0.4
│ │ └── react-native@0.79.5 deduped
│ ├─┬ @react-navigation/native-stack@7.3.25
│ │ └── react-native@0.79.5 deduped
│ └─┬ react-native-is-edge-to-edge@1.2.1
│ └── react-native@0.79.5 deduped
├─┬ expo-status-bar@2.2.3
│ ├─┬ react-native-edge-to-edge@1.6.0
│ │ └── react-native@0.79.5 deduped
│ └── react-native@0.79.5 deduped
├─┬ expo-symbols@0.4.5
│ └── react-native@0.79.5 deduped
├─┬ expo-system-ui@5.0.10
│ └── react-native@0.79.5 deduped
├─┬ expo-web-browser@14.2.0
│ └── react-native@0.79.5 deduped
├─┬ expo@53.0.20
│ ├─┬ expo-asset@11.1.7
│ │ └── react-native@0.79.5 deduped
│ ├─┬ expo-file-system@18.1.11
│ │ └── react-native@0.79.5 deduped
│ └── react-native@0.79.5 deduped
├─┬ react-native-gesture-handler@2.24.0
│ └── react-native@0.79.5 deduped
├─┬ react-native-gifted-charts@1.4.63
│ ├─┬ gifted-charts-core@0.1.65
│ │ └── react-native@0.79.5 deduped
│ └── react-native@0.79.5 deduped
├─┬ react-native-reanimated@3.17.5
│ ├─┬ react-native-is-edge-to-edge@1.1.7
│ │ └── react-native@0.79.5 deduped
│ └── react-native@0.79.5 deduped
├─┬ react-native-safe-area-context@5.4.0
│ └── react-native@0.79.5 deduped
├─┬ react-native-screens@4.11.1
│ └── react-native@0.79.5 deduped
├─┬ react-native-svg@15.11.2
│ └── react-native@0.79.5 deduped
├─┬ react-native-webview@13.13.5
│ └── react-native@0.79.5 deduped
└─┬ react-native@0.79.5
└─┬ @react-native/virtualized-lists@0.79.5
└── react-native@0.79.5 deduped
npm ls expo
├─┬ @react-native-community/datetimepicker@8.4.1
│ └── expo@53.0.20 deduped
├─┬ @react-native-kakao/core@2.4.0
│ └── expo@53.0.20 deduped
├─┬ expo-apple-authentication@7.2.4
│ └── expo@53.0.20 deduped
├─┬ expo-blur@14.1.5
│ └── expo@53.0.20 deduped
├─┬ expo-build-properties@0.14.8
│ └── expo@53.0.20 deduped
├─┬ expo-constants@17.1.7
│ └── expo@53.0.20 deduped
├─┬ expo-dev-client@5.2.4
│ ├─┬ expo-dev-launcher@5.1.16
│ │ └── expo@53.0.20 deduped
│ ├─┬ expo-dev-menu-interface@1.10.0
│ │ └── expo@53.0.20 deduped
│ ├─┬ expo-dev-menu@6.1.14
│ │ └── expo@53.0.20 deduped
│ ├─┬ expo-manifests@0.16.6
│ │ └── expo@53.0.20 deduped
│ ├─┬ expo-updates-interface@1.1.0
│ │ └── expo@53.0.20 deduped
│ └── expo@53.0.20 deduped
├─┬ expo-font@13.3.2
│ └── expo@53.0.20 deduped
├─┬ expo-haptics@14.1.4
│ └── expo@53.0.20 deduped
├─┬ expo-image@2.4.0
│ └── expo@53.0.20 deduped
├─┬ expo-linear-gradient@14.1.5
│ └── expo@53.0.20 deduped
├─┬ expo-router@5.1.4
│ └── expo@53.0.20 deduped
├─┬ expo-splash-screen@0.30.10
│ └── expo@53.0.20 deduped
├─┬ expo-symbols@0.4.5
│ └── expo@53.0.20 deduped
├─┬ expo-system-ui@5.0.10
│ └── expo@53.0.20 deduped
├─┬ expo-web-browser@14.2.0
│ └── expo@53.0.20 deduped
└─┬ expo@53.0.20
├─┬ expo-asset@11.1.7
│ └── expo@53.0.20 deduped
├─┬ expo-file-system@18.1.11
│ └── expo@53.0.20 deduped
└─┬ expo-keep-awake@14.1.4
└── expo@53.0.20 deduped
답변 2
0
prebuild 후 안드로이드 폴더에서 android/app/src/main/AndroidManifest.xml
이 파일에 아래와 같은 코드가 있는지 확인해 보셔요
참고: https://slobell.com/blogs/48
<uses-permission android:name="android.permission.INTERNET"/>
0
넵 백엔드쪽에서 특정 api 호출했을 때 콘솔 찍히게 해두고 확인중인데
development build 에서 해당 페이지 접근 했을 때는 요청이 안들어오고 있는 걸로 확인이 됩니다.
앱단에서 요청할 때 try/catch 문 내에서 await api.get().then().catch((e) => {}) 로 사용해서 에러가 찍히게끔 되어 있는데 개발빌드일 땐 전혀 나오질 않고 있습니다.
expo go 환경에선 잘 나오고 있는데..ㅠㅠ
환경변수 문제인가 해서 env 파일에서 가져오던 api url을 하드코딩으로 변경하였는데도 동일하게 아무런 에러 없이 데이터가 안나오고 있습니다. ㅠㅠ
혹시 앱이 완성되기 전에 apk 파일 추출하는 방법 관련해서 확인해볼만한 게 있을까요?