title: React Native gets stuck at "Building 61% > :app:mergeDebugResources"
body: <p>I'm trying to run a React-Native android app.</p>
  
  <p>All the required SDK files are downloaded and everything about the dependencies should be fine, but when I hit the <code>react-native run-android</code> command it gets stuck at </p>
  
  <blockquote>
    <p>"Building 61% > :app:mergeDebugResources"</p>
  </blockquote>
  
  <p>here is the complete console log:</p>
  
  <pre><code>    react-native run-android
  Starting JS server...
  Running /home/ali/Downloads/android-sdk-linux//platform-tools/adb reverse tcp:8081 tcp:8081
  * daemon not running. starting it now on port 5037 *
  * daemon started successfully *
  error: no devices/emulators found
  Could not run adb reverse: Command failed: /home/ali/Downloads/android-sdk-linux//platform-tools/adb reverse tcp:8081 tcp:8081
  Building and installing the app on the device (cd android &amp;&amp; ./gradlew installDebug...
  Starting a new Gradle Daemon for this build (subsequent builds will be faster).
  :app:preBuild UP-TO-DATE
  :app:preDebugBuild UP-TO-DATE
  :app:checkDebugManifest
  :app:preReleaseBuild UP-TO-DATE
  :app:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE
  :app:prepareComAndroidSupportAppcompatV72321Library UP-TO-DATE
  :app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
  :app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
  :app:prepareComAndroidSupportSupportVectorDrawable2321Library UP-TO-DATE
  :app:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE
  :app:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE
  :app:prepareComFacebookFrescoFresco0110Library UP-TO-DATE
  :app:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE
  :app:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE
  :app:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE
  :app:prepareComFacebookReactReactNative0320Library UP-TO-DATE
  :app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
  :app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
  :app:prepareDebugDependencies
  :app:compileDebugAidl UP-TO-DATE
  :app:compileDebugRenderscript UP-TO-DATE
  :app:generateDebugBuildConfig UP-TO-DATE
  :app:generateDebugAssets UP-TO-DATE
  :app:mergeDebugAssets UP-TO-DATE
  :app:generateDebugResValues UP-TO-DATE
  :app:generateDebugResources UP-TO-DATE
  :app:mergeDebugResources
  AAPT err(1559605289): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1838692001): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(341786400): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1318881500): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(2031786380): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1712650048): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(536775832): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(558020168): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(2029168255): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1962416436): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1078641575): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(871612259): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(256729263): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1280959212): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1562609003): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(439000834): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(698069606): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1841922512): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(1745052097): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  AAPT err(2080059535): /home/ali/Downloads/android-sdk-linux/build-tools/23.0.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
  Exception in thread "png-cruncher_4" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_2" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_15" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_11" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_5" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_14" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_8" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_12" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_16" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_1" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_6" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_13" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_9" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_10" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_7" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_3" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_18" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_17" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_20" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  Exception in thread "png-cruncher_19" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
      at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
      at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
      at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
      at java.lang.Thread.run(Thread.java:745)
  &gt; Building 61% &gt; :app:mergeDebugResources
  </code></pre>
  
  <p>I waited about an hour but nothing happens!</p>
  
  <p>Any contribution to solve this problem will be appreciate.</p>