setup nox (or genymotion )as android emulator for vscode flutter - flutter

for some reason, I don't want to install android studio(one of them is I don't have enough space for now) but instead, I want to work with vscode and nox(or genymotion). and my question is: Is it possible to connect vscode and an (android and ios) emulator to see the result? in other words, I want to connect the nox as an emulator to vscode and see the result inside of it.

Android studio take too much space and even my computer also become hot when open Android studio. But what I did I installed Android studio and Android emulator but I don't use Android studio rather I use VScode.
So as far as I know you need Android studio to install emulator then you can use VScode with it.

Finally, I found out how I can connect Genymotion to the VS Code(without Installing Android Studio).in total SDK manager wasn't installed on my laptop, so at first, I installed it. and then
Platform Tools (ADB & Fastboot)
Install Platform
Add System Image
Install Build Tools
but wait I just name the steps I've done. you can follow this article on this link to get more details.
and finally, instead of installing an emulator, I used Genymotion with Flutter in VS Code, which you can follow in this article to get more information. Click here

Related

Why visual studio code does not recognize my phone?

I am new with flutter. when connecting the device the pc detects it but not the vscode
However, here I leave what flutter doctor throws. I'm new to flutter so I don't quite understand what they suggest. I already have usb debugging enabled developer options install via usb etc. it's a redmi 9a.
Simple way:
Download android studio
Click Tools > SDK Manager. Or
In the SDK Tools tab,
In the SDK platforms tab, install any one android version
Go to the windows terminal and accept android licenses.
flutter doctor --android-licenses
Make sure you have vs code extensions for flutter installed and then restart your VS Code.
You also have to enable USB debugging in developer options in your mobile in order to get detected by your PC
There is a hard way too without installing android studio.

Running Flutter on a Genymotion machine using VS Code

I'm using VS Code as my IDE for Flutter and I'm trying to run my app in a Genymotion machine. How can I do that? The machine doesn't appear in VS Code bottom bar in the Devices section.
N.B:
I'm not looking for any solutions regarding Android emulators or Android Studio, only VS Code with Genymotion.
Alright, so after an hour or so of searching I found out the solution. It's entirely the same as the approach of using Genymotion in Android Studio. The only difference is you don't need to install a plugin for VS Code. However, in my case, it was a bug in Genymotion it self. I was using v3.0.1 which had some incompatibility bug with Android SDK 28 and this was the reason why the Genymotion machine did not show up as a device in VS Code, because this latter relies on Android SDK to determine what are the devices that run Android.
The solution for me was simply upgrading my Genymotion to v3.0.2 which fixed the incompatibility with Android SDK 28.
In case anyone runs into this problem in the future and this doesn't work, make sure that your Genymotion ADB settings use the Android SDK installed in your machine by Android Studio and not the one shipped with Genymotion itself.

How create android emulator without android studio?

Android Studio 3.2.
I create 2 emulators by Android Studio. Nice.
But the question is:
Is it possible to create android emulator WITHOUT Android Studio?
Our QA need to use emulators for test our applications. But it not need Android Studio.
How QA can create android emulator without Android Studio?
There are a lot of 3th party emulators out there, which are quite easy to use and fast to set up. Just have a quick look in your favorite search engine. But here is a short list of better known ones:
BlueStacks
Genymotion
Nox App Player
MeMu
ARChon
KoPlayer
They should all be able to run your app on a pc to show someone. Have a look on them and inform yourself about the licensing and features.
1 - Download Java JDK from the following link and install: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2 - Download the Android SDK from the following link and install: https://android-sdk.uptodown.com/windows/descargar
3 - Download Intel HAXM from the following link and install: https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm
4 - Start the SDK Manager, install the tools and platforms you need.
5 - Start AVD Manager and create new emulator.
Yes, we can setup Android Emulator without installing Android Studio. We have to download commandline-tools and use sdkmanager, avdmanager, emulator tools to make an emulator and run it.
Ref:-
https://stackoverflow.com/a/65537217/11620356
https://stackoverflow.com/a/65563126/11620356

Flutter- Creating an android emulator for my app

I wrote an app, and now I want to test on a Android environment,but when I press debug, no emulator is shown. I clicked on create new emulator, and It says creating new emulator, but nothing happens after that. Also, I tried to connect my phone to use it as an emulator but It wasn't being found by visual studio code. I am a beginner so please, any helps
Try to reinstall flutter SDK and don't forget to install flutter plugin on your editor (Android Studio or VsCode), Depending on your OS follow one of this instruction, it's so simple to install.
https://flutter.io/docs/get-started/install

Nativescript project running with Visual Studio Emulator

I have a Nativescript application that I'm developing using VS Code and have no issues when I try to run it using the Nativescript launch configurations from the Nativescript extension, when I'm using a real device connected with USB or when I use one of the android-sdk emulators.
Now I need to run Hyper-V on the machine too and those emulators cannot run when hypervisor is on. So I downloaded and installed Visual Studio Android Emulator which runs fine when I launch it manually.
Problem is that the nativescript project doesn't recognize this device either with tns device or adb devices commands and if I try to launch the application from VS Code it tries to launch one of the other emulators, which obviously fails due to the hypervisor/Intel Haax incompatibility.
Did any of you had this problem before and have any solutions you can share?
Thanks.
Microsoft MSDN say :
If the emulator is running, but it does not appear to be connected to ADB or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB.
The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory.
Here We Go!! Step By Step ;)
Copy Your ANDROID SDK PATH for me it look like this :
To modify the Android SDK path used by the emulator:
Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools in the folder tree on the left.
Note : if Android SDK Tools folder doesn't exist, Create it under WOW6432Node, And open it, And Create a String Value name it Path:)
Modify the Path registry variable to match the path to your Android SDK.
Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.
Now! Open Your Terminal (CMD), and Run ADB command
adb devices -l
YES YES !! The Visual Studio Emulator is running, and connected to ADB!
HERE WE GOO !!
Now We Want To Create A Demo App (for example FIRSTZAKI) ZAKI is my nickname :p
On Terminal (CMD) :
tns create FIRSTZAKI
Choose Android Platform
cd FIRSTZAKI\
tns platform add android
Check if VS EMULATOR is ready!
tns devices
YES YES ^^
Finally Step (RUN/BUILD) :
tns run android
WOW ... Great :)
AND .. Good Luck ♥ — ZAKI