Emulator not running the application - flutter

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.

Related

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

I'm not able to run any flutter app on my emulator (VSC & Android Studio)

So basically the problem is that I created a new flutter app, and the I opened the emulator(from android studio), and I clicked on run.
I had multiple problems that were related to heap memory and such, but I managed to solved most of then using all kind of methods from the internet.
I even deleted and installed Java and android studio multiple times, I changed the Enviromental Variables as the Internet suggested, but now, the current error that I get is this:
The Error Image
my flutter doctor -v:
flutter doctor -v image
I'm about to lose my mind, I'm on this issuse for a few weeks. please help me fix it
after your seggestion to add "gradle.properties" and adding "org.gradle.jvmargs=-Xmx1024m" to it (without the " "):
after
Perhaps you shoud add a line at end of file gradle.properties org.gradle.jvmargs=-Xmx1024m then clean the project, also validate cache and restart the android studio. It should works then.

Flutter on VS Code run stuck on "Installing build\app\outputs\apk\app.apk..."

When I run my application using the VS Code Run and Debug, The app is installed on my device and is stuck on a white screen. Meanwhile in the editor, the VS Code notification is stuck on "Installing build\app\outputs\apk\app.apk..."
I've tried to run different flutter apps on the physical device but was still met with the same error. I've also tried to run the flutter example increment app, but to no avail. I also uninstalled and reinstalled the flutter sdk from the stable GitHub branch but that also did not work. I've also tried solutions from about 22 other questions with similar problems.
However, when I use flutter run from the command line, the app installs and launches on my phone, however, I'm unable to use the Flutter DevTools Inspector.
P.S I've been able to debug flutter apps on the device with the Flutter DevTools in the past.
As of Flutter v1.20.2, this problem has been resolved. The linked GitHub issue is here if you disagree about the problem being solved.
You'll need to end the flutter, dart and flutter processes. So in terminal do this:
killall adb
killall dart
killall flutter
Then reload vscode

How to hot reload on both ios and android devices at the same time using IntelliJ IDEA?

I'm using IntelliJ IDEA to code Flutter and usually have 2 simulators running (ios and android). It is kinda annoying when I have to switch the target device manually when I update the code.
Any plugin that can do the trick for IntelliJ IDEA
~As I know, this feature only supported in Visual Studio Code~
Please check https://github.com/flutter/flutter/wiki/Multi-device-debugging-in-VS-Code
Updated Genchi Genbutsu
It possible to do with console commands
Flutter Hot Reload to multiple devices

Eclipse using Android emulator

I wonder if anyone has faced the same problem.
When we done some modification on the code, as the emulator is running; is there any way we could see the instant change without closing the emulator?
Sometimes when I made changes on the code then run the emulator, the amendment that I made doesn't seem to show on the emulator even after I clean the project.
Does anyone have any idea how to solve this?
Thanks.
Eclipse has an option under 'Run' in the menu bar to build, and run. This will re-package the application and send it to either your AVD, or attached android phone.