greetal
greetal

Reputation: 1535

I am getting error on running my first project on flutter.How can it be solved?

I am using visual studio code with Genymotion as a device. I have connected Genymotion with VSCode too by specifying the path on Genymotion. But when I run the code flutter run, it gives me an error:

Launching lib\main.dart on 192.168.127.101:5555 in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        96.0s
√ Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...                         4.1s
Error waiting for a debug connection: Bad state: No element
Error launching application on 192.168.127.101:5555.

Upvotes: 5

Views: 1363

Answers (2)

Marcio
Marcio

Reputation: 1733

I had this problem too, and I solved it like this:

In your Terminal Console

$> flutter channel stable
$> flutter upgrade
$> flutter pub get

You can consult here

Upvotes: 4

kinza
kinza

Reputation: 35

Go to the sdk manager, check which sdk's you have downloaded if your andriod is 7 or 9 do download these sdk e.g 7 or 9 and also check genymotion version as well. or go to cmd write 'flutter doctor' it will show you errors. while downloading the required sdk's make sure your device is connected with fast internet for faster downloading. otherwise it will stop and show you errors.

Upvotes: -2

Related Questions