'Unable to run windows desktop app on android studio using flutter

I'm new to flutter dev and android studio, so basically whenever i run my app on windows(desktop), my app opens for 20sec on windows but then gets closed automatically.

It shows :

"LOST CONNECTION TO DEVICE" ,

I don't know what is the problem !? I didn't even have the app.so file present in any folder, I had to ask a friend to mail me this file, and even after pasting the file in the

build->windows->runner->debug folder, it's showing the same error.

flutter doctor -v result is :

C:\Users\Shaurya>flutter doctor -v
[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.19043.1586], locale en-IN)
    • Flutter version 2.10.3 at C:\src\flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (3 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at C:\Users\Shaurya\AppData\Local\Android\sdk
    • Platform android-32, build-tools 32.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.1.32228.430
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.65.2)
    • VS Code at C:\Users\Shaurya\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.36.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19043.1586]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 99.0.4844.74
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 99.0.1150.46

[√] HTTP Host Availability
    • All required HTTP hosts are available


• No issues found!

Please help me out !



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source