Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to build react-native 2 project to phone

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.

like image 220
gastonche Avatar asked Dec 16 '16 09:12

gastonche


People also ask

How do I run React Native code in mobile?

Running your React Native application Install the Expo Go app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo Go app to scan the QR code from your terminal to open your project. On iOS, use the built-in QR code scanner of the default iOS Camera app.

Does React Native work on Android?

Overview. React Native is an open-source mobile application framework created by Facebook. It is used to develop applications for Android, iOS, Web and UWP (Windows) providing native UI controls and full access to the native platform. Working with React Native requires an understanding of JavaScript fundamentals.

Does React Native support Android 11?

This is officially supported in React Native 0.63. August 2021: All new Android apps on Google Play must target SDK level 30 (Android 11). This will be officially supported in an upcoming version of React Native. November 2021: All updates to existing Android apps on Google Play must target SDK level 30 (Android 11).

Can the same react components be used for both Android and iOS?

With React Native, one team can maintain two platforms and share a common technology — React. As you can use the same source code to run on iOS and Android devices, you don't have to. It helps you save development time and cost, without compromising on quality or performance.


1 Answers

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
like image 187
Ngannv Avatar answered Nov 10 '22 01:11

Ngannv