In the past, the android simulator was painfully slow and I use the device only to debug the android applications.
What's the preferred development environment, simulator, or device for React native application?
Actually, emulator can be super fast given the fact that you can configure them as you want (Giving as many RAM as your computer has).
My job is to do mobile app with RN and I almost only user the emulator. For the feature that does not work on it (Opening file with app proposition, for example), I'm using a device.
I also stopped using the debug mode for Android because it is so slow! If you want to look at the console.log, you can open a terminal at the root of your project and run react-native log-android. It will allow to see the log without being force into debugging
Related
I know there are documents on this, but I have no clue how to get the app to actually show up on the phone. All I get after running is a Node.js window on my PC instead of phone.
I am using Expo for this purpose. There is a link to it https://expo.io/
It's pretty easy to set up and use.
When you run it from, for example, Visual Studio Code you can run it on your real device, just installing Expo app from AppStore/GooglePlay (Scan the QR code) as well as on PC in Android Studio etc.
Use expo
Expo enables you to run your react-native app on your local android or iOS simulator as well as physical devices.
I am getting started with flutter. After a day of installing all the required stuff and running an android emulator for the first time, I figured that my pc is not powerful enough for running android without significantly slowing down the computer.
(Nope, I cant upgrade my pc.)
I was wondering if there is any way I can do flutter on my pc. Any way to get something like ui output on dartpad.
I am using VSCode.
If you have an android phone, just turn on developer mode and USB debugging on it and connect it to your computer and click run. Then the apk file will be installed on your phone and it will instantly change states whenever you click run. If you don't have an android phone you can easily get a decent one for just under $50.
If you have physical android device, you can connect it to your computer. and type flutter run in your terminal.
or
use flutter web(beta) type flutter run -d chrome in your terminal.
How do I debug an Ionic app on an Android device using VS Code and Chrome Debugger?
Chrome Debugger (vscode-chrome-debug) documentation mentions that remote debugging can be done so I'm assuming that this means it can be done on an Android Device.
Can anyone give the steps and launch.json file for this?
Hi this one bothered me too for a period of time.
I use a simple approach to achieve this.
Run the command
cordova run android -debug
And I keep the android studio open along with it.
Now when your application is running on your device or simulator you can select that in Android studio and select the process you want to debug.
in android monitor you can get all the logs for that application.
Note:- It doesn't matter what application is open in Android Studio, as long your ionic app is in debug mode you can get logs there.
I wonder whether it is possible to test a Cordova project made with Intel Xdk on an Android emulator rather than a device on USB or the Intel embedded emulator.
Yes. You will have to install and run the APK file you build onto the Android Emulator. Although, I would recommend you build without Crosswalk (meaning, uncheck the "optimize with Crosswalk" build settings option) if you are going to run your app on the Android emulator.
However, it's usually a lot faster to just install it directly onto a real Android device and use remote CDT over USB to debug the app. See this doc page for help setting up remote CDT on your system.
Of course, there are some system-level debugging things you can do on the Android emulator that can be difficult or impossible to do on a real device, depends on your device.
I implemented gulp-angular-templatecache-ionic to my Ionic app, which made my application run significantly faster in my desktop chrome browser, but when I build and deploy (ionic run android) this application to my device (LG Nexus 5x) it is still slow, it looks like nothing has changed, as if the built android version does not use the angular template cache.
I followed this article: http://tombuyse.com/improving-the-performance-of-your-ionic-application/
Any ideas or suggestions how to debug?
Thanks!
In order to debug your WebView app please follow this guide from google
https://developer.chrome.com/devtools/docs/remote-debugging
If your android version is less than 4.4, then you cannot debug through the chrome devtools.
you can instead run an emulator via the adb emulator, you'll need the android sdk and the adb tool.
read more here: https://developer.android.com/studio/run/emulator.html
The default android emulator/simulator is slow, and also need the HAXM accelerator, you can download the Genymotion simulator which is a replacement for the default android emulators, and run faster, also doesn't need to change anything in your hardware configuration
https://www.genymotion.com/