React-native: ๋นŒ๋“œ ์‹คํŒจ: ํฌ๋Ÿฐ์ฒ˜ ์‹คํŒจ

์— ๋งŒ๋“  2016๋…„ 05์›” 02์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: facebook/react-native

app:mergeDebugResources ์ž‘์—…์— ๋ฌธ์ œ๊ฐ€

์˜ค๋ฅ˜:

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Crunching Cruncher abc_tab_indicator_mtrl_alpha.9.png failed, see logs

๋ฐฉ๊ธˆ ์ด ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ์ƒˆ๋กœ์šด ๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ํ”Œ๋Ÿฌ๊ทธ์ธ ๋ฐ ๊ธฐํƒ€ ์ฝ”๋“œ๊ฐ€ ์•„์ง ์ถ”๊ฐ€๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

react-native init MyProject

package.json ์—์„œ React ๋ฒ„์ „ 0.24.1์ด ์„ค์น˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

{
  "name": "TestReact",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "react": "^0.14.8",
    "react-native": "^0.24.1"
  }
}

Android์—์„œ๋Š” ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉฐ iOS์—์„œ๋„ ๋™์ผํ•œ ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š”์ง€ ํ™•์‹คํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
๊ฐœ๋ฐœ์„ ์œ„ํ•ด Ubuntu๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

gradle.properties ํŒŒ์ผ์— ๋”ฐ๋ฅด๋ฉด Gradle์€ ๋ฒ„์ „ 2.4์ž…๋‹ˆ๋‹ค.

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” ์‚ฌ๋žŒ์„ ์œ„ํ•ด. ์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

http://stackoverflow.com/questions/22701405/aapt-ioexception-error-2-no-such-file-or-directory-why-cant-i-build-my-grad

64๋น„ํŠธ OS์˜ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. aapt๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค์Œ 2๊ฐœ์˜ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

sudo apt-get install lib32stdc++6 lib32z1

๋ชจ๋“  3 ๋Œ“๊ธ€

๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” ์‚ฌ๋žŒ์„ ์œ„ํ•ด. ์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

http://stackoverflow.com/questions/22701405/aapt-ioexception-error-2-no-such-file-or-directory-why-cant-i-build-my-grad

64๋น„ํŠธ OS์˜ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. aapt๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค์Œ 2๊ฐœ์˜ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

sudo apt-get install lib32stdc++6 lib32z1

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ž…๋‹ˆ๋‹ค.

๊ฐ์‚ฌ ํ•ด์š”! ์ €์—๊ฒŒ๋„ ํšจ๊ณผ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. :+1:

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰