问题
I have my react-naive project completely setup and have been trying to run it to my phone but kep getting the following error when i run the
react-native run-android
command.
Output:
java.io.IOException: Cannot run program "/home/webshinobis/Android/sdk/build-tools/23.0.1/aapt": error=2, No such file or directory
But i have checked the build tools and that file is right there. I have reinstalled the build tools for 23.0.1 but no change. any ideas to help? thanks.
回答1:
Required libraries for 64-bit machines:
If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries:
$sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
If you are running 64-bit Fedora:
$sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
回答2:
Ah thank you. I just followed this
sudo dpkg --add-architecture i386
sudo apt-get update
but I got an error said that couldn't found the package. Then I found answer in here . To summarize it , you should add architecture i386 like this
sudo dpkg --add-architecture i386
sudo apt-get update
this work for me very well.
来源:https://stackoverflow.com/questions/41181412/unable-to-build-react-native-2-project-to-phone