Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Error when trying to debug Windows App

Tags:

flutter

I am trying to start Windows app for first time with default Flutter Project but it's showing this error espacialy.

Unable to start engine without AOT data.
Failed to create view controller.
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
Error launching application on Windows.
Exited (sigterm)

Here is my flutter doctor -v results:

[√] Flutter (Channel stable, 2.10.0, on Microsoft Windows [Version
    10.0.19042.1526], locale tr-TR)
    • Flutter version 2.10.0 at D:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5f105a6ca7 (2 weeks ago), 2022-02-01 14:15:42 -0800
    • Engine revision 776efd2034
    • Dart version 2.16.0
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version    
    31.0.0)
    • Android SDK at D:\sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = C:\Users\pc\AppData\Local\Android\Sdk
    • Java binary at: D:\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at
    .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.0)  
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community 
    • Visual Studio Community 2022 version 17.1.32210.238
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2020.3)
    • Android Studio at D:\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)   

[√] Connected device (2 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API  
      30) (emulator)
    • Windows (desktop)       • windows       • windows-x64 • Microsoft Windows      [Version 10.0.19042.1526]

[√] HTTP Host Availability

I tried flutter clean but it is not working. What can I do for this error?

like image 336
Tolga Yılmaz Avatar asked Mar 09 '26 08:03

Tolga Yılmaz


2 Answers

I have fixed this issue from aceta-minophen on github (https://github.com/flutter/flutter/issues/97086#issuecomment-1029963716)

aceta-minophen solution:

Found the app.so file in ..\build\windows

Copied the file and pasted it in ..\build\windows\runner\Debug\data

[UPDATE]

upgrading flutter to the last version should fix this:

RUN:

flutter upgrade

like image 65
Daly Hachicha Avatar answered Mar 12 '26 03:03

Daly Hachicha


It seems that problem with this version of Visual Studio

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

Try to unintall Visual Studio Community 2022 and install Visual Studio Community 2019

With Visual Studio 2019 all works like a charm :)

like image 33
Alex Zhulin Avatar answered Mar 12 '26 04:03

Alex Zhulin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!