4

The emulators are there but when I launch the app it doesn't work, please help :)

I have tried everything.

Cal, Flutter newbie.

I have followed the installation guidelines and tried fixes from other stack flow answers i am running windows 8.1 singular user. i have tried from command prompt and in the android terminal

<***C:\Users\Callum\first_app> Flutter emulators

2 available emulators:

Pixel_2_API_27 • pixel_2 • Google • Pixel 2 API 27

Pixel_2_API_28 • pixel_2 • Google • Pixel 2 API 28

To run an emulator, run 'flutter emulators --launch '.

To create a new emulator, run 'flutter emulators --create [--name xyz]'.

You can find more information on managing emulators at the links below:

https://developer.android.com/studio/run/managing-avds

https://developer.android.com/studio/command-line/avdmanager

C:\Users\Callum\first_app> Flutter emulators --launch Pixel_2_API_28

//emulator launches

C:\Users\Callum\first_app> Flutter run

No connected devices.

C:\Users\Callum\first_app>***>

I want the flutter app to run

UPDATE

C:\Users\Callum\first_app> flutter doctor -v

[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 6.3.9600], locale en-US)

• Flutter version 1.2.1 at C:\src\flutter\flutter

• Framework revision 8661d8aecd (3 months ago), 2019-02-14 19:19:53 -0800

• Engine revision 3757390fa4

• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[√] Android toolchain - develop for Android devices (Android SDK version

28.0.3)

• Android SDK at C:\Users\Callum\AppData\Local\Android\sdk

• Android NDK location not configured (optional; useful for native

profiling support)

• Platform android-28, build-tools 28.0.3

• Java binary at: C:\src\Andriod studio\jre\bin\java

• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-

b01)

• All Android licenses accepted.

[√] Android Studio (version 3.4)

• Android Studio at C:\src\Andriod studio

• Flutter plugin version 35.0.1

• Dart plugin version 183.6270

• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-

b01)

[!] Connected device

! No devices available

! Doctor found issues in 1 category.

but there are emulators available. Could the problem be the environment variables i have set?;

ANDRIOD_HOME- Value: C:\Users\Callum\AppData\Local\Android\Sdk

Path- Value: C:\src\flutter\flutter\bin;%ANDRIOD_HOME%\tools;%ANDRIOD_HOME%\platform-tools

Update 2

I have installed vscode. the bottom right says no device, i clicked on it and chose a device(the devices I created in andriod studio were here). I got the following error "Failed to launch emulator: Error: Emulator didn't connected within 60 seconds"

Update 3

I tried to run ABD.exe from command prompt, i got the following error : "the program cannot start beacuse api-ms-crt-locale-l1-1-0.dll is missing from your computer. try reinstalling the program to fix this problem". I then downloaded the missing dll and put it in the platform-tools folder.

I also installed C++ developer tools from the windows website as that contained the dll that i was looking for.

I now get a 'the application was unable to start correctly (0xc000007b) click ok to close application.

After all this, if i remove the dll from the platform tools folder, i still get the error "the program cannot start beacuse api-ms-crt-locale-l1-1-0.dll is missing from your computer. try reinstalling the program to fix this problem"

11
  • which editor you are using? if you are using VScode just use f5 and vscode does everything for you. May 1, 2019 at 16:47
  • Im using andriod studio, trying to get the first code to work, doing my first app( code comes with the flutter framework). used a video tutorial and the notes from the flutter website.
    – Callum
    May 1, 2019 at 16:51
  • Ok.. You need to check this out if it helps here May 1, 2019 at 16:53
  • Thanks i did... but im missing something between the editor and the emulator.. the editors (andriod studio and VScode) both launch emulator and then fail to connect to the same emulator
    – Callum
    May 1, 2019 at 17:27
  • Are you able to start emulator without debug? here May 1, 2019 at 17:29

2 Answers 2

7

I have the same issue, but in my case, the Emulator was already running successfully via Android Studio, so it was enough for me to just do the following steps:

1. Run this command > "Flutter emulators"
2. Select the relevant emulator and run > "flutter emulators --launch Pixel_2_API_28"
3. Within your app folder path, run > "flutter run"

After the last command, you would get something like this message:

Using hardware rendering with device AOSP on IA Emulator. If you notice graphics artifacts, consider enabling software rendering with "--enable-software rendering".

Launching lib\main.dart on AOSP on IA Emulator in debug mode...

Running Gradle task 'assembleDebug'...

Running Gradle task 'assembleDebug'... Done

1
  • woa, this worked. I just opened the emulator, runned the "flutter run" and worked. Thanks!
    – Carlost
    Aug 30 at 15:01
-1

enter image description here

Press Ctrl+Shift+P and click Launch Emulator

2
  • 1
    The emulator launches but then cant connect to vscode program
    – Callum
    May 2, 2019 at 7:59
  • i cant understand May 2, 2019 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.