react-native run-android and react-native start - android-studio

Do I have to run react-native run-android and react-native start in my command prompt every time time I reopen my project and emulator?
-- Thanks

You usually do. The react-native run-android command might be optional if you do not want to deploy the android native code again (for instance, if you have not made any changes). You will have to launch the application manually and it will try to connect to the packager that starts with react-native start. I am not sure if you can bundle the JS for offline use in debug mode. Maybe you can try the same procedure as in this answer, but with assembleDebug in order to avoid that one.

Related

How to see changes in react native code with Android studio

am new to React Native. I have react native app (android). I run my app with Android studio and that is all working well. When I made some changes in let's say components, that changes are not reflecting in Android. I try to run react-native run-android but that not working?
Also I try this: react-native start --reset-cache
Can somebody help me with this? How can I apply code changes to the android version of my app?
It is probably because you metro server is not running. Before doing react-native run-android try to run npm start
Did you apply real-time Refresh?
Enable Hot Reloading In React Native
Follow the below steps to enable Hot Reloading Feature :
First launch your app on the device or emulator.
Command To Run React Native App :
react-native run-android
Then click on emulator and press CTRL + M (CMD + M on MacOS) or shake the Android device which has the running app.
Then select the Enable Hot Reloading option from the popup.
Enable Hot Reloading In React Native

Ionic 5 capacitor android project not sync

Android studio keeps building and install the first android project into the device.
I have tried
npx cap sync
npx cap copy android
Even delete the /android folder and add it again. The project still remains as the first time I added into the android studio. I have tried 'Gradle sync' and 'Invalidate cache /restart' still no luck.
I have update my project resource icon and splash to a customized one, but the android project still using the capacitor default icon and splash. Have anyone face this issue before?
I found the solution!
I notice the npx sync is copying data from the www folder. Thus, I think I need to update the www folder first before sync. Thus I use the
ionic build
Command, to build all the files into www and run
npx cap sync
npx cap open android
Tada, android project is updated.
Every time you perform a build (e.g. ionic build) that changes your web directory (default: www), you'll need to copy those changes down to your native projects:
ionic build or npm run build
npx cap copy
npx cap open android
reference : https://capacitor.ionicframework.com/docs/getting-started/with-ionic
if you are using the ionic commands the all you have to do is call ionic capacitor sync... it will do all of the building and the copying of assets
https://ionicframework.com/docs/cli/commands/capacitor-sync

Nodejs Electron how to get rid of the right click option on the windows context menu

I am trying to get rid of the option to press electron on the windows context menu/rename it and change the picture. To explain it better I want to stop electron showing here https://gyazo.com/8b8f2a17c3ec0acba646a4d4abfacd47
You can't rid of "Electron" context title without building the application.
You need to build your Electron application with electron-builder or electron-packager for Windows.
You can't rid of "Electron" context title without building the application.
You need to build your Electron application with electron-builder or electron-packager for Windows.

Could not install app on device, react-native

I am extremely new to app development. I am facing the following error during the installation of my app on emulator by using the CLI:
Error Message on the Terminal:
Following are the details of my project:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
I don't know what is causing this, and I have tried deleting the gradle (version 2.14.1) multiple times and zipping it again inside the 'gradle' folder. Still It does not seem to be resolved.
How can I solve the problem?
I have the same problem as yours! Because when I first run "react-native run-android", my INTERNET is SLOW and LAG, CORRUPTED. This bad internet connection lets to download a TEMPORARY DAMAGE file gradle....zip.
Solution: The gradle-2.14.1-all.zip was damaged,so it should be replaced with a new gradle-2.14.1-all.zip
Then go to android folder of your react native application
./gradlew clean
Try running the application again

Not able to run React-native app on android

I have everything installed,but when i use "npm-start" or "react-native run-android",it gets stuck at Loading "Dependency Graph ,done",nothing happens after that,any inputs would be helpful,running on Windows 10.
Make sure you have a device connected (either emulator or physical device) by running adb devices
I usually have two command line windows open. In one window I run react-native start and in the other I run react-native run-android.
Essentially, react-native start runs a packager for your app while react-native run-android will install the app on the device. If you only run react-native run-android, a new packager should start in a new cmd window.
The packager (react-native start) is where you will see Loading dependency graph... Done.

Resources