All my old projects were able to launch debugging with Android Emulator. When I press F5, it will shows a list of installed Android Emulator for me to select for debugging.
But today, I have created a new project, and it launches debugging in Chrome instead.
First you'll need to check if the android platform has been initialized for the project. If you project has an android folder then it has been initialized, if you will need to create it with the following command: flutter create --platforms android .
To run the emulator, check the bottom right corner of the screen you should see the currently selected platform, if you click on the selected platform a pop up should appear allowing you to select from all supported platforms.
You can also you use quick-open (ctrl+p) and type in >flutter launch emulator, if no emulator is found it will provide you the option to create one as well.
Related
In the android studio, I have installed an emulator. However, I can't use it. I couldn't figure out the issue and I need ur help.
No selected device
No connected device error
flutter doctor output
project structure SDK directory
I can start the emulator, but I can not see my project there.
In the no selected device bar there is an icon with a small phone , click on it , you will get a list of emulators , select your's
I have this issue several time.
What fix this for me is to "Restart Flutter Daemon" (Double tap on shift in Android Studio then search for this action)
If I press Ctrl+Enter, Shift+F9 or Shift+F10, or go to Run > Run 'main.dart' or Run > Debug 'main.dart', Android Studio tries to run or debug my app on my android device, if connected, or else reports 'No connected devices...'. Debug behaves as expected, stopping at breakpoints.
('No connected devices' is already strange, as flutter devices returns that both android and Chrome devices are connected and flutter doctor returns no issues. Flutter web is enabled.)
If I go to terminal in Android Studio, I can execute flutter run -d chrome, and the app runs in 'debug mode' on Chrome. This debug mode, however, does not stop at breakpoints or behave in any obviously different way to if the app were simply run.
How can I run flutter apps on Chrome and have Android Studio stop at breakpoints?
To ensure that Android Studio is able to see the Chrome to run the project as a web app, you can select the Chrome from the list of devices dropdown - highlighted in a rectangle in the picture. You can also run the app in debug mode by clicking on the shortcut button from the toolbar - highlighted in circle.
I'm currently running Flutter plugin version 71.2.3 and the breakpoints works as expected. Dart plugin is on version 213.7433
I have been trying to run Flutter demo app for the first time in Android Studio.
I have installed up all settings for flutter in Android Studio and now I am trying to run the app in emulator but it keeps saying 'no devices' even though emulator is running.
I have tried
flutter doctor --android-licenses
flutter doctor
all set up variables in user setting
installed all sdk properly in proper pathenter image description here
It may be related with your Android emulator, you can try to create new one.(It is weird but solved my problem once)
and be sure about the device is active, In your console type adb devices and you should see your android emulator like following.
Go tools -> Avd manager -> then install an emulator if u didn't , then install a system image .
Documentation
https://developer.android.com/studio/run/managing-avds
you can drag debug apk file that you find in (Your App location)\build\app\outputs\apk\debug\app-debug.apk and put it on android emulator and it will install it and run it
It's a simple step to solve this. Just click on project Structure which you will find near Search icon on Android studio toolbar and before your profile icon, you will find project structure. Click on it and select Project SDK And press Ok. You will find that your device is now showing.
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
I'm trying out the MoSync IDE (special version of Eclipse to develop cross-browser Android and iOS apps with HTML/Javascript).
It currently uses the standard SDK Android emulator which is rediculously slow. I found Bluestacks which is a lightning-fast android emulator.
I already found out how to use Bluestacks with Phonegap from within Eclipse (by using the adb connect command), but I can't figure out if it's even possible to test apps on Bluestacks from within the MoSync IDE...
Any ideas?
This works on Mac, and I see no reason why it should not also work on Windows:
Start Bluestacks
Run MOSYNCDIR/bin/android/adb connect localhost:10001, where MOSYNCDIR is your MoSync installation directory
In the MoSync IDE, click the tiny arrow next to the Select Target Device toolbar item and in the dropdown select Scan for Android USB device
If properly connected, a dialog pops up with a list of connected devices. Select localhost:10001 and click Ok
To actually run on the emulator, select a project in the Project Explorer (usually the leftmost panel in the IDE). Then click the Send to Target Device toolbar item.