Issue 1:
I had a Flutter app that was working just fine until today. I realized that flutter build apk wasn't building the Flutter app with the latest code. Looked up on the internet. Did a flutter clean. Then built the app again with flutter build apk. The following is the error I'm getting,

On Beta channel.

===== CRASH =====

version=2.1.0-dev.1.0.flutter-ccb16f7282 (Tue Aug 21 22:21:20 2018 +0000) on "linux_simarm"
si_signo=Segmentation fault(11), si_code=1, si_addr=0x4
Dart snapshot generator failed with exit code -6
Snapshotting exited with non-zero exit code: -6
Woah! You appear to be trying to run flutter as root.
We strongly recommend running the flutter tool without superuser privileges.
/
📎
39.5s
Built build/app/outputs/apk/release/app-release.apk (4.3MB).

Before doing "flutter clean" the app size was 6.5 MB.

On master channel.

===== CRASH =====

version=2.1.0-dev.4.0.flutter-05ccfa8502 (Tue Sep 11 09:03:02 2018 +0000) on "linux_simarm"
si_signo=Segmentation fault(11), si_code=1, si_addr=0x5
Dart snapshot generator failed with exit code -6
Snapshotting exited with non-zero exit code: -6

FAILURE: Build failed with an exception.

* Where:
Script '/opt/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 428

* What went wrong:
Execution failed for task ':app:flutterBuildRelease'.
> Process 'command '/opt/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

I then downgraded Flutter. The flutter build apk is working just fine.

How do I resolve this issue?.

Flutter Doctor Output:

[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] Android Studio (version 3.0)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.25.1)
[!] Connected devices
! No devices available

! Doctor found issues in 1 category.

Some related content I found regarding this same issue.

#14891, #21025

Thank you.

Issue 2:
Instead it just hangs after printing some obscura about running its isolate:

$ (cd ~/flutter/remove_this; flutter clean; flutter run)
Deleting 'build/'.
Launching lib/main.dart on Nexus 5 in debug mode...
Initializing gradle... 0.9s
Resolving dependencies... 0.8s
Running 'gradlew assembleDebug'... 13.6s
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk... 14.1s
E/flutter (31696): [ERROR:flutter/shell/common/engine.cc(151)] Could not prepare to run the isolate.
E/flutter (31696): [ERROR:flutter/shell/common/engine.cc(116)] Engine not prepare and launch isolate.
E/flutter (31696): [ERROR:flutter/shell/platform/android/android_shell_holder.cc(136)] Could not launch engine in configuration.
Syncing files to device Nexus 5... 5.3s

🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on Nexus 5 is available at: http://127.0.0.1:40901/
For a more detailed help message, press "h". To quit, press "q".

Ideally, the app would fail early, with a simple "no main function" error message.