๊ด€๋ฆฌ ๋ฉ”๋‰ด

๐Ÿ–ฅ dev-ruby

[RN] ์ˆ˜๋งŽ์€ ์˜ค๋ฅ˜(์—๋Ÿฌ) ํ•ด๊ฒฐ.. ๋ณธ๋ฌธ

React Native

[RN] ์ˆ˜๋งŽ์€ ์˜ค๋ฅ˜(์—๋Ÿฌ) ํ•ด๊ฒฐ..

ruby_s 2022. 4. 3. 02:25
728x90
๋ฐ˜์‘ํ˜•
SMALL

์ง„์งœ ๊ณต์‹ ๋ฌธ์„œ๋งŒ ์ฃผ์˜๊นŠ๊ฒŒ ์ฝ์–ด๋„ ๋‚˜์ง€ ์•Š์„ ์—๋Ÿฌ๋“ค์ด ๋งŽ์€ ๊ฒƒ ๊ฐ™๋‹ค..ใ…Ž

1. Could not find proper version of cocoapods (1.11.3) in any of the sources Run `bundle install` to install missing gems.

์™œ ๊ทธ๋Ÿฐ์ง€ ๋ชจ๋ฅด๊ฒ ๋‹ค๋งŒ.. pod install ์„ ํ•˜๋ฉด ์ž๊พธ๋งŒ ์ € ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค. ๊ทธ๋Ÿด ๊ฒฝ์šฐ ํ•˜๋ผ๋Š” ๋Œ€๋กœ ํ•˜๋ฉด๋œ๋‹ค.
$ bundle install ์„ ์‹คํ–‰ํ›„ pod install ์„ ํ•˜๋ฉด ์ž˜๋œ๋‹ค.

2. Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

์ด๊ฑด ์–ด์ด์—†๋Š” ์˜ค๋ฅ˜ ใ…Ž
์ด๋ฏธ ์‹คํ–‰ ์ค‘์ธ ํฌํŠธ๊ฐ€ ์žˆ๋Š” ๊ฑฐ๋‹ค. ํ„ฐ๋ฏธ๋„์—์„œ ๋ญ๊ฐ€ ๋Œ์•„๊ฐ€๊ณ  ์žˆ๋Š”์ง€ ์ฃผ์˜ ๊นŠ๊ฒŒ ๋ณด์ž.. ์ข…๋ฃŒํ•˜๊ณ  ์‹คํ–‰ํ•˜๋ฉด ์ž˜ ๋ ๊ฑฐ๋‹ค

3. mac jdk Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

1. Android - Preferences์— ๋“ค์–ด๊ฐ„๋‹ค. (mac๊ธฐ์ค€) - ์œˆ๋„์šฐ๋Š” File - setting์ผ๊ฑฐ๋‹ค.

2. Build, Execution, Deployment - Build tools - Gradle ์— ๋“ค์–ด๊ฐ€๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ํ™”๋ฉด์ด ๋ณด์ธ๋‹ค.
- ๋‹จ, ๋‚ด๊ฐ€ ์ž‘์—…ํ•˜๊ณ  ์žˆ๋Š” ํด๋”์˜ android ํด๋”๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ์—ด์–ด ์ค€ ๋’ค ๋“ค์–ด๊ฐ€์•ผ ํ•œ๋‹ค.
๋‚œ ๊ทธ๊ฒƒ๋„ ๋ชจ๋ฅด๊ณ  ์‹œ์ž‘ํ™”๋ฉด์—์„œ Gradle projects๊ฐ€ ์•ˆ๋ณด์—ฌ์„œ ํ—ค๋งธ๋‹ค

์—ฌ๊ธฐ์„œ Gradle JDK๋ฅผ 11๋ฒ„์ „์œผ๋กœ ๋งž์ถฐ์ฃผ์ž.
์•ˆ๋“œ๋กœ์ด๋“œ๋ฅผ ์ฒ˜์Œ ๊น ๊ฒฝ์šฐ JDK๊ฐ€ ์—†๋Š” ๊ฒƒ ๊ฐ™๋‹ค. ๊ทธ๋ž˜์„œ ๋‚˜๋Š” ์•„๋ž˜ ๋งํฌ์—์„œ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์•˜๋‹ค.
https://www.oracle.com/kr/java/technologies/javase/jdk11-archive-downloads.html
๋‹ค์šด๋กœ๋“œ ๋ฐ›๊ณ  Add JDK๋กœ ๋‹ค์šด๋ฐ›์€ ํŒŒ์ผ์„ ๋„ฃ์–ด์ฃผ๋ฉด ๋œ๋‹ค~!

4. Requiring unknown module 'undefined' ~

1. node_module ํด๋” ๋ฐ yarn.lock ํŒŒ์ผ ์‚ญ์ œ
2. $ yarn
3. $ yarn cache clean

5. adb reverse ENOENT

ํ™˜๊ฒฝ๋ณ€์ˆ˜๊ฐ€ ์ž˜๋ชป ์„ค์ •๋˜์–ด์„œ ๋‚˜๋Š” ์˜ค๋ฅ˜๋‹ค.
ํ•ด๊ฒฐ๋ฒ•(macOS ๊ธฐ์ค€)
1. bash_profile์„ ์—ด์–ด์ค€๋‹ค.

$ open ~/.bash_profile

2. ๋‹ค์Œ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ๋งจ ์•„๋ž˜์— ๋„ฃ์–ด์ฃผ์ž. ์ฐธ๊ณ ๋กœ open๋ช…๋ น์–ด๋Š” ๋ฉ”๋ชจ์žฅ์ฒ˜๋Ÿผ ๋งˆ์šฐ์Šค๋กœ ์กฐ์ž‘์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

export ANDROID_SDK=/Users/<your_computer_name>/Library/Android/sdk
export PATH=/Users/<your_computer_name>/Library/Android/sdk/platform-tools:$PATH

3. ์ €์žฅ ํ›„ ๋‹ซ๊ธฐ
4. ๋ณ€๊ฒฝ์‚ฌํ•ญ ์ปดํŒŒ์ผํ•˜๊ธฐ

source ~/.bash_profile

6. Error while waiting for device: AVD Pixel_2_API_28_2 is already running. If that is not the case, delete the files at C:\Users\UserName\.android\avd/Pixel_2_API_28_2.avd/*.lock and try again.

์—๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ๋น„์ •์ƒ์ ์œผ๋กœ ์ข…๋ฃŒํ–ˆ์„ ๋•Œ ๋œจ๋Š” ์˜ค๋ฅ˜๋‹ค. ์ด์ƒํ•˜๊ฒŒ ์ข…๋ฃŒ ๋ฒ„ํŠผ์„ ๋ˆŒ๋ €๋Š”๋ฐ ์ข…๋ฃŒ๊ฐ€ ๋˜์ง€ ์•Š์•˜๋‹ค. ๊ทธ๋ž˜์„œ ๊ฐ•์ œ ์ข…๋ฃŒ๋ฅผ ํ•˜๋ ค๊ณ  ํ•˜์˜€์œผ๋‚˜ ๊ทธ๊ฒƒ์กฐ์ฐจ ๋จน์ง€ ์•Š์•˜๋‹ค..
1. ํ•ด๋‹น Virtual Device๋ฅผ ์‚ญ์ œํ•œ๋‹ค. ๋””๋ฐ”์ด์Šค์˜ ์˜ค๋ฅธ์ชฝ์— ์  3๊ฐœ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด Delete ํ•  ์ˆ˜ ์žˆ๋‹ค.
2. ์ข…๋ฃŒํ•  ๋•Œ๋Š” ์—๋ฎฌ๋ ˆ์ดํ„ฐ์—์„œ ํƒญ์˜ x๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์ง€์›Œ์ฃผ๋ฉด ๋œ๋‹ค.

7. The following build commands failed: CompileC /Users/ โ€ขโ€ขโ€ข main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

์ด๋Ÿด ๊ฒฝ์šฐ pod๋ฅผ ์žฌ์„ค์น˜ ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ์•„๋งˆ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ install ํ–ˆ๋‹ค๊ฐ€ ์‚ญ์ œํ•œ ๊ฒฝ์šฐ ios์™€ android์— ๋ฐ˜์˜๋˜๋Š” ๋ฌธ์ œ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•œ ๊ฒƒ๊ฐ™๋‹ค.

$ cd ios -> ios ํด๋”๋กœ ์ด๋™
$ pod deintegrate -> pod ์‚ญ์ œ
$ pod update -> ์ตœ์‹ ๋ฒ„์ „์œผ๋กœ ์—…๋ฐ์ดํŠธ
$ pod install -> Podfile์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์žฌ์„ค์น˜

Podfile์— ์—ฌ๋Ÿฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ๋“ค์–ด์žˆ๋Š” ์ƒํƒœ์—์„œ install & updateํ•˜๋ฉด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์ด ์„ค์น˜๋œ๋‹ค.

์ถ”๊ฐ€๋กœ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” ๋ถ€๋ถ„์„ ์ง„๋‹จํ•ด์ค€๋‹ค.

$ npx @react-native-community/cli doctor


์ฐธ๊ณ 

react-native android ์„ธํŒ…
https://reactnative.dev/docs/environment-setup#installing-dependencies

Setting up the development environment ยท React Native

This page will help you install and build your first React Native app.

reactnative.dev

https://www.npmjs.com/package/react-native-image-crop-picker?activeTab=versions

react-native-image-crop-picker

Select single or multiple images, with cropping option. Latest version: 0.37.3, last published: 2 months ago. Start using react-native-image-crop-picker in your project by running `npm i react-native-image-crop-picker`. There are 57 other projects in the n

www.npmjs.com

https://github.com/ivpusic/react-native-image-crop-picker

GitHub - ivpusic/react-native-image-crop-picker: iOS/Android image picker with support for camera, video, configurable compressi

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping - GitHub - ivpusic/react-native-image-crop-picker: iOS/Android image picker with supp...

github.com

728x90
๋ฐ˜์‘ํ˜•
LIST