VS Code Live Share Flutter? - visual-studio-code

I have a flutter project and an android emulator running.
With visual studio code live share my friend can se all my files and code.
How can he run the code on an emulator on his end as well?
Because now he can only see the code but can't run the app.
Is it possible for him to see my emulator or run the project himself?

Vscode shares only the code.
If you want to share the app too, you'll need another program such as TeamViewer or similar.

Related

Emulator not running the application

I am trying to setup flutter on my device, so far I have been able to download the flutter SDK and android studio and satisfy the conditions of flutter doctor to start learning android application development:-
flutter doctor
I ignored the absence of visual studio as I don't want my app to be compatible with windows(as I am trying to develop for Android) but I am not able to fix the missing java bundle, any help on how would I do that?
I just ignored it for a second and moved on to set up my emulator but on running, it shows a pop up which says "Attach a debugger or ESC to cancel"(the pop-up is something like this.) how would I fix it.
This doesn't run the app on the emulator so how would I fix that?
Also on trying to debug, it throws this error, I am totally confused on how to proceed further to at least run my app so that I could start developing and learning flutter?
I am following along this to run my application.
Edit:
I have the java bundle in place but don't know how would I configure Android Studio to get it.
java's prescence
Also that the emulator is now showing that the System UI is not responding and on closing it, it further shows this.
It's been a week since I am trying to work out the setup of flutter but some way or the other some issue happens, please help.
Thanks in advance.
you have to install java runtime environment and It'll work. get from here
it'll show like this if you have JDK installed properly.

Can I code a whole Flutter app with just vscode?

I'm just starting to program with Flutter and I'm wondering if it's possible to program a whole flutter app, with just vs code, because of many reasons I can't use Android Studio on my laptop.
Just knowing if it's possible would be enough for me :)
Well, I started a standard Flutter App and I'm developing it from the basis.
Yes, you can code a whole Flutter project with VScode, you need just to follow the install process of all requirements for flutter:
https://docs.flutter.dev/get-started/install
However, you will need Android Studio in order to get an Android Emulator, to debug and preview your work process. ( you will not need to run it every time from Android Studio)
and when you will have the emulator installed then you can do the whole code process of a Flutter project only from VScode

How can I open emulator or connect LD Player for flutter in VS Code?

I want to develop flutter apps but I don't have enough RAM in my laptop (just 4 gigs). So, after lots of extensive research on the internet, I installed and setup flutter sdk, android sdk and VS Code. But when I try to run a sample app, I can't see list of any available emulators on my VS Code bottom-left screen.
VS Code screenshot (see bottom left).
I am not getting any kind of errors when I run flutter doctor command.
Flutter doctor outputs in powershell.
There's a folder in Drive C where I've installed the Android SDK named as "emulator". There's an executable file named emulator.exe as well but opening it does nothing.
Emulator Folder screenshot.
I also have an external emulator LD Player installed on my laptop but I am not able to connect it with the code editor i.e., VS Code.
Please refer to the links to see the images as I don't have privileges to upload images. I'm a newbie here and this is my first question. Thanks in advance!
You will need to activate ADB settings in your LD Player Emulator.
First, go to settings
Then, select other settings
After that, make sure that you have activated the ADB connection by selecting Open Connection

Flutter Without Emulator

I cannot install the Android Emulator in my working environment, therefore I wondered whether it is possible to code/learn Flutter without any mobile device (or emulator). For example, is it possible to run/test the code by using the browser?
There are two non-mobile options, both of which are currently in development stages but could be used for learning Flutter:
flutter-desktop-embedding, particularly the example which you can check out and flutter run with minimal setup, and then modify.
The Flutter for web technical preview.
Flutter Desktop Launcher for Mac OS/Linux, support hot reload via VS Code
GitHub Link: https://github.com/putraxor/flutter_desktop_launcher

Launch/Test VS Emulator for Android in/from VS Code

I've noticed that Visual Studio has a separate/independent VS Emulator for Android, but I can't figure out how to launch/test their emulator directly from Visual Studio Code. Has anyone used it before? Can anyone tell me how to connect/launch the emulator in/from VS Code?
there is a marketplace plugin for that:
https://marketplace.visualstudio.com/items?itemName=343max.android-emulator-launcher
launch via
Cmd-Shit-P > Launch Android Emulator
you can also create a task to do it:
https://gist.github.com/wbroek/a2caf1ace90eac0c5e25497548f41a6e
and put the task in your debug pipeline (see this: https://www.gamedev.net/articles/programming/general-and-gameplay-programming/android-debugging-with-visual-studio-code-r4820/). this will launch the emulator. to have the emulator open to whatever you're doing, it depends on the framework, etc. For instance, React Native you can use expo for "realtime" updating/debugging (basically just an app that lives on the phone and proxies the compiled code). For full "automated" pipeline, you'd need a task to build your apk, upload it to the phone, then launch apk.