Running Flutter on a Genymotion machine using VS Code - flutter

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.

Related

setup nox (or genymotion )as android emulator for vscode 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

Anti-aliasing does not seem to work in Android Emulator

I was working fine with Android Emulator (on Manjaro Linux) a few weeks ago, but after updating software The GUI of Android Emulator is not rendering or anti-aliasing is not working anymore. My apps are displaying horrible texts.
I'm using Hardware-GLES 2.0 for my graphic emulator.
Additional info:
Is there another alternative Android emulator working with Visual Studio Code?
ANSWER: Android Studio's Android emulator is not an efficient emulator, a better emulator is Genymotion.
I had a same problem. Downgrading Android Emulator to lower version solved the issue.
Latest version (before 30.9.5) that I could find was 30.8.4 with build id 7600983.
In order to downgrade firstly you will need to download the emulator. Here are the links for the version 30.8.4:
Linux - https://dl.google.com/android/repository/emulator-linux_x64-7600983.zip
MacOS - https://dl.google.com/android/repository/emulator-darwin_x64-7600983.zip
Windows - https://dl.google.com/android/repository/emulator-windows_x64-7600983.zip
You can also download even older versions here are few alternatives
After downloading the needed version of emulator you will need to unzip it.
The next thing is to replace your current emulator with new one.
Go to your Android Sdk folder (mine was ~/Android/Sdk)
cd ~/Android/Sdk
Rename your
current emulator files folder. mv emulator emulator.bak
Copy new
emulator
cp -r ~/Downloads/emulator-linux_x64-7600983/emulator/ .
Replace package.xml file (otherwise Android Studio will not
recognize your new emulator)
cp emulator.bak/package.xml emulator/package.xml
Restart your Android Studio and Enjoy!
Seems like this issue was fixed with newest major 32 version of Android emulator.
Newest 32.1.6 and 32.1.7 Canary 1 versions behave like the things were before 30.9.5 which broke anti-aliasing completely for me on all Windows devices. I am using Hyper-V so HAXM is not available for me.
Emulators archive: https://developer.android.com/studio/emulator_archive

Visual Studio Code - Flutter : "Device emulator-5554 is offline"

I have just spent an hour reading through similar questions on Stack Overflow, and they are all for Android Studio, not Visual Studio Code. Also, I am doing Flutter development, so don't have access to adb commands, such as adb kill-server.
Everything was fine, unlike I clicked the power button on my emulated Android. Now, when I run/start debug and select active device, I get Failed to launch Nexus 5X API 29 x86: Error: Emulator didn't connect within 60 seconds.
How can I restart the emulated device? When it appears, clicking the power button does not seem to do anything. Is there a flutter terminal command?
Or can I somehow use a different emulator (if so, how)?
I faced the same issue with Android Virtual Device and Memu emulator so I switched to Genymotion.
I am using Genymotion personal edition which works amazingly and it's very light on resources too as compared to AVD and Memu.
You can download Genymotion Personal edition from Genymotion Personal Edition
Apart from Installing emulator Image you should also consider installing the GAPPS bundle in the emulator as it does not comes with it preinstalled. GAPPS will be needed in many apps requiring Google Play Services.
Here are the docs on how to install GAPPS in Genymotion emulator: GAAPS Docs
GAAPS Website
My Genymotion Emulator is Google Pixel 3a, 9.0 API 28.

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

Visual Studio 2015 Cannot connect to Android Emulator

I have created a blank Android Native C++ project using Visual Studio 2015 Preview. When I click to run it on the emulator, the emulator will load but I always get the following error and cannot run the app on the emulator.
3>Starting emulator...
3>Error installing the package. The device '169.254.191.177:5555' is invalid or not running. Please switch to another device, or use the Android Virtual Device (AVD) Manager to start a compatible emulator, or connect a compatible Android device.
3>The device is invalid or is not running.
Would this be because I have the Windows Phone emulator installed ? I havnt done anything except install Visual Studio 2015, create project, and run.
Short answer: you need to use "adb connect 169.254.191.177:5555"
Long answer:
Visual Studio 2015 Android Emulator issue
This is not likely to be a result of having the Windows Phone Emulator installed. More likely is that there is a problem with the connection between the VS Android Emulator and Visual Studio. Repairing your VS and VS Emulator for Android installations by going to Control Panel > Programs and Features may resolve this.