when i first run react-native run-android
i got this error
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: AAPT process not ready to receive commands
which is my aapt error with log like this above
app:mergeDebugResources
AAPT err(Facade for 806023675): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 320379832): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1789437959): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1055339140): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 520641803): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1656371171): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1847553157): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1677766557): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1952482313): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1103640883): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1227322743): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 962420428): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1155783227): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 236690628): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1275003794): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1275871824): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 2018846724): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 291122889): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
AAPT err(Facade for 1890726756): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
AAPT err(Facade for 122608110): /usr/Android/Sdk/build-tools/23.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
... :app:mergeDebugResources FAILED
i installed android sdk correctly, i run my android emulator and i have my react native packager running
i just paste this in the command line and enter
sudo apt-get install lib32stdc++6 lib32z1
this works for me , maybe you have different problem with AAPT so i can't say this is the absolute answer but this works for me
Note: Not every aapt
error's solution is this, but i hope this may help some of you.