metro bundler packager terminal is missing in ubuntu 18.04 LTS while building react native app - microsoft-metro

I'm building a react native app for android in ubuntu 18.04.1 LTS. I used a physical device for building my react native app. Actually it behave like the app is being build but i can't find metro bundler terminal. I have build the app by running react-native run-android command. What can i do to open metro bundler terminal? can anyone help?

According to my knowledge metro bundler(patching app) not run when you use physical device to run application. only run when we use emulator.
You can execute =>
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
on terminal(project directory) and use android studio to build&run your app.Otherwise when u update ur index.js file and build apk for device that update not gonna apply. so when you do some update to index.js execute that code. it ll do metro bundler(patching app) manually.

try running react-native start --reset-cache in one terminal from your project directory and run react-native run-android from another terminal from the same directory

Related

React native Android Project Not starting in emulator

i just created a react native project on windows, using expo. After Creating the project i ran npm start and then expo start the next logical thing to do is to press the a button which will launch, the project on the android virtual device, but instead it gave me this error Couldn't start project on Android: Error running adb: Error running app. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=exp://192.168.43.148:19000 flg=0x10000000 }
when i tried running it on my android phone with the expo android app it ran smoothly, i don't know what to do please help thanks
I had the same problem and I got it fixed as follows:
Go to SDK Manager in Android studio > SDK Tools and check whether there is any update for Android SDK Build-Tools. If there is any, please make sure you update it.
Close any Android virtual device currently running and then go to Android Studio Virtual Device Manager and wipe the data of your Android virtual device.
Make sure you have enough internal storage allocated for your Android virtual device to install apps.
Check whether Android Debug Bridge utility is installed in your device. If not please install it. To install in mac, I used the below command (Assuming that you have HomeBrew installed in your mac device):
brew install android-platform-tools
Start your Android virtual device ( This step should be done before running the expo development server)
In the Developer options menu of your Android virtual device, make sure USB debugging option is enabled.
Finally, try running the development server by expo start and press on the button to run on your Android emulator.

How run my flutter project on iOS (on my Linux machine)?

Android studio 4.0
Linux Mint 19.3
I create my simple Flutter project and success run it on my Android device.
Nice.
But now I need to run my Flutter project on iPhone. So... to do this I need... what I need?
Maybe install iOS on Virtual Box (on my Linux machine) and then install XCode and then run my Flutter project on XCode? Or maybe has another approach?
You can do that with CI/CD services like Codemagic
How to develop and distribute iOS apps without Mac with Flutter & Codemagic

Export AOSP emulator files after build

After a successful build of the AOSP using a non GUI server run's Ubuntu, I want to download the files to my mac or windows and run it on the Android Studio emulator or any other emulator.
What files do I have to download and how to run it on my mac ?
Download link:https://source.android.com/setup/build/downloading
Build link: https://source.android.com/setup/build/building
after building source code successfully, run the below command:
emulator -verbose -show-kernel

Expo Project Does not start on Emulator

Following the documentation, I did install expo-cli and android-studio on Windows10 64bit. created an emulator with Google API 27 android Oreo 8.1.
ANDROID_HOME and JAVA_HOME are in the system varibales with their bins in thepath
expo init awesomeProject chose experimental with native modules and tabbed theme.
cd awesomeProject and both yarn start and expo start will start the Expo Developer Tools on localhost:19002 with Metro Bundler on port 19001.
the created Android Emulator is also open and running
either pressing a on the command line or run on android device/emulator in DevTools does nothing with no error. no project opens on the emulator
Devtools shows a toast success simulator ready, and terminal prints opening on Android device
closing the emulator shows expected errors that there is no device.
What is wrong with my env setup?

Easiest way to install the Ionic android app I created on a mobile

On this website (https://ionicframework.com/docs/intro/deploying/) I read that I should give this command on the command prompt: ionic cordova run android --prod --release
I tried it but it only tried to start the app on an emulator (I have some problems with it, so it didn't actually start the emulator). Does this command also create a file I can put on my mobile and install the app? I don't want to put the app on Google play, just on my mobile.
I tried putting the android-debug.apk on my mobile and running it but my mobile couldn't install it (.../platforms/android/build/outputs/apk/android-debug.apk)
I'm not trying to test the app on my mobile, I'm trying to install it.
If you want to deploy the apk to your device
ionic cordova run android --device is indeed correct. (try adding --device)
You only need --prod --release when building for production (longer buildtime).
Before running (= building, installing and starting your app) check if your device has USB-debugging enabled. You can check if your device is connected by running adb devices. Since the run command includes building, yes run should create a apk for you.
As you said you also could install the apk manually. Here make sure to use the correct apk. android-debug.apk is the development build (no --release tag) and since your trying to run a production one (--release) you are looking for android-release.apk or android-release-unsigned.apk.
go to settings -> security in your phone then check Unknown sources (Allow installation of apps from sources other than the play store) and try to put the android-debug.apk again. this should work