4
votes

I am currently working on Xamarin Forms and want to try Flutter.
I created a Flutter project with Android Studio. But I can't run it.
I get this error on Android Emulator Error launching the application on Android SDK built for x86 64.

flutter doctor looks fine. some example app like Flutter Gallery can work but some can't.

The platform is Windows 10 64 bit. Android Studio 3.2.1

Error Message is:

Launching lib\main.dart on Android SDK built for x86 64 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Error: ADB exited with exit code 1
adb: failed to install
C:\Users\xxx\source\flutter\flutter_app\build\app\outputs\apk\app.apk:
Error launching application on Android SDK built for x86 64.

C:\flutter>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.472], locale zh-TW)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] IntelliJ IDEA Community Edition (version 2018.3)
[!] VS Code, 64-bit edition (version 1.30.1)
[!] Connected device
! No devices available

! Doctor found issues in 2 categories.

1

1 Answers

3
votes

As you can see from those lines:

X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.

You are missing the plugin for flutter and dart.

Go to:

File -> Settings -> Plugins

and install Flutter

enter image description here

And check to see if dart was installed as well enter image description here