'Flutter build apk error Dart snapshot generator failed with exit code -1073741819
here is my flutter doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 6.3.9600],
locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Android Studio (version 3.6)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.48.2)
[√] Connected device (1 available)
• No issues found!
when i try to compile it says error Dart snapshot generator failed with exit code -1073741819 and i have ried flutter clean and pub upgrade
Solution 1:[1]
Its amazing there is no error there is not stack trace to solve this error how ever i overcome this problem but deleting flutter folder from src then reinstall then compile. It works even again to generate new apk i need to delete and copy fresh file.
Solution 2:[2]
Run flutter clean before you generate the signed version because it has previous builds cached files. So I run flutter clean
and it worked.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Khal |
Solution 2 | Dhananjay Gavali |