React Native on Android
Installing Linux Dev Environment
On ubuntu you can install the android SDK with apt-get install android-sdk
.
You'll need a target device to test your app against. You can plug it in and use adb to do the hard work. Make sure to install the Expo App on your target device - this will serve as a host on the device that allows it to run your new app in development and do hot-reloading of your code.
Creating a Project
Using npx create a new project with the tooling provided by React Native like so:
npx create-expo-app AwesomeProject
cd AwesomeProject
npm start # you can also use: npx expo start
Running the Project
Start the app with npm run android
you might get error messages about not knowing where android home is. On ubuntu android home installed from deb packages is normally at /usr/lib/android-sdk
(source) so just run:
export ANDROID_HOME=/usr/lib/android-sdk
before you try to launch the app.