[snaps] Build fails using Android studio run button but succeeds using terminal command
See original GitHub issueBuild fails when using Android studio Run button but works using flutter run
from terminal.
Using Ubuntu, using snaps for both Android studio and Flutter
Steps to Reproduce
- Install Android studio
sudo snap install android-studio --classic
- Install flutter
sudo snap install flutter --classic
- Install Linux dependencies
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
- Set flutter up
flutter channel dev && flutter upgrade && flutter config --enable-linux-desktop
- Create and run a dummy flutter project
flutter create counter && cd counter && flutter run -d linux
- Open Android studio
- Install dart and flutter plugins
- Restart Android studio
- Open the counter project just created
- On the top select Linux as device
- Click on
main.dart
and edit configuration to add--verbose
to Additional Arguments - Click run
Build fails with the following output:
[ +86 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +21 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] f25bd9c55c48c139524139b477d04b13e9f36b2c
[ ] executing: [/home/fabio/snap/flutter/common/flutter/] git tag --contains HEAD
[ +124 ms] Exit code 0 from: git tag --contains HEAD
[ ] 1.21.0-1.0.pre
1.21.0-5.0.pre
[ +6 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/dev
[ ] executing: [/home/fabio/snap/flutter/common/flutter/] git ls-remote --get-url origin
[ +2 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +26 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] dev
[ +29 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +8 ms] executing: /home/fabio/Android/Sdk/platform-tools/adb devices -l
[ +27 ms] List of devices attached
[ +7 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +132 ms] Generating /home/fabio/Projects/scratches/counter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +75 ms] Starting incremental build...
[ +1 ms] Initializing file store
[ +7 ms] Skipping target: gen_localizations
[ +3 ms] complete
[ +5 ms] Launching lib/main.dart on Linux in debug mode...
[ +3 ms] /home/fabio/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/fabio/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root /home/fabio/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -Ddart.developer.causal_async_stacks=true -Dflutter.inspector.structuredErrors=true --output-dill /tmp/flutter_tools.GVHMWB/flutter_tool.PGCAYY/app.dill --packages .packages -Ddart.vm.profile=false -Ddart.vm.product=false --bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation --initialize-from-dill build/f872507f30e2ff2523f0f1d19160266e.cache.dill.track.dill
Building Linux application...
[ +22 ms] <- compile package:counter/main.dart
[ +1 ms] executing: [build/linux/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug /home/fabio/Projects/scratches/counter/linux
[ +39 ms] -- Configuring done
[ +6 ms] -- Generating done
[ ] -- Build files have been written to: /home/fabio/Projects/scratches/counter/build/linux/debug
[ +2 ms] executing: ninja -C build/linux/debug install
[ +3 ms] ninja: Entering directory `build/linux/debug'
[+4173 ms] [1/6] Generating /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/libflutter_linux_gtk.so, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_engine.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_call.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_response.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_value.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_view.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[ +316 ms] [2/6] Building CXX object CMakeFiles/counter.dir/flutter/generated_plugin_registrant.cc.o
[ ] FAILED: CMakeFiles/counter.dir/flutter/generated_plugin_registrant.cc.o
[ ] /snap/flutter/21/usr/bin/clang++ -I/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral -isystem /snap/flutter/current/usr/include -isystem /snap/flutter/current/usr/include/gtk-3.0 -isystem /snap/flutter/current/usr/include/at-spi2-atk/2.0 -isystem /snap/flutter/current/usr/include/at-spi-2.0 -isystem /snap/flutter/current/usr/include/dbus-1.0 -isystem /snap/flutter/current/usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem /snap/flutter/current/usr/include/gio-unix-2.0 -isystem /snap/flutter/current/usr/include/cairo -isystem /snap/flutter/current/usr/include/pango-1.0 -isystem /snap/flutter/current/usr/include/harfbuzz -isystem /snap/flutter/current/usr/include/atk-1.0 -isystem /snap/flutter/current/usr/include/pixman-1 -isystem /snap/flutter/current/usr/include/freetype2 -isystem /snap/flutter/current/usr/include/libpng16 -isystem /snap/flutter/current/usr/include/gdk-pixbuf-2.0 -isystem /snap/flutter/current/usr/include/glib-2.0 -isystem /snap/flutter/current/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -Wall -Werror -pthread -MD -MT CMakeFiles/counter.dir/flutter/generated_plugin_registrant.cc.o -MF CMakeFiles/counter.dir/flutter/generated_plugin_registrant.cc.o.d -o CMakeFiles/counter.dir/flutter/generated_plugin_registrant.cc.o -c /home/fabio/Projects/scratches/counter/linux/flutter/generated_plugin_registrant.cc
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/flutter/generated_plugin_registrant.cc:5:
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/flutter/generated_plugin_registrant.h:8:
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/flutter_linux.h:22:
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h:14:
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_view.h:12:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gtk/gtk.h:30:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdk.h:32:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdktypes.h:35:
[ ] In file included from /snap/flutter/current/usr/include/pango-1.0/pango/pango.h:46:
[ ] In file included from /snap/flutter/current/usr/include/pango-1.0/pango/pango-utils.h:25:
[ ] /snap/flutter/current/usr/include/stdio.h:41:10: fatal error: 'bits/libio.h' file not found
[ ] #include <bits/libio.h>
[ ] ^~~~~~~~~~~~~~
[ ] 1 error generated.
[ +19 ms] [3/6] Building CXX object CMakeFiles/counter.dir/my_application.cc.o
[ ] FAILED: CMakeFiles/counter.dir/my_application.cc.o
[ ] /snap/flutter/21/usr/bin/clang++ -I/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral -isystem /snap/flutter/current/usr/include -isystem /snap/flutter/current/usr/include/gtk-3.0 -isystem /snap/flutter/current/usr/include/at-spi2-atk/2.0 -isystem /snap/flutter/current/usr/include/at-spi-2.0 -isystem /snap/flutter/current/usr/include/dbus-1.0 -isystem /snap/flutter/current/usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem /snap/flutter/current/usr/include/gio-unix-2.0 -isystem /snap/flutter/current/usr/include/cairo -isystem /snap/flutter/current/usr/include/pango-1.0 -isystem /snap/flutter/current/usr/include/harfbuzz -isystem /snap/flutter/current/usr/include/atk-1.0 -isystem /snap/flutter/current/usr/include/pixman-1 -isystem /snap/flutter/current/usr/include/freetype2 -isystem /snap/flutter/current/usr/include/libpng16 -isystem /snap/flutter/current/usr/include/gdk-pixbuf-2.0 -isystem /snap/flutter/current/usr/include/glib-2.0 -isystem /snap/flutter/current/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -Wall -Werror -pthread -MD -MT CMakeFiles/counter.dir/my_application.cc.o -MF CMakeFiles/counter.dir/my_application.cc.o.d -o CMakeFiles/counter.dir/my_application.cc.o -c /home/fabio/Projects/scratches/counter/linux/my_application.cc
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/my_application.cc:1:
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/my_application.h:4:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gtk/gtk.h:30:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdk.h:32:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdktypes.h:35:
[ ] In file included from /snap/flutter/current/usr/include/pango-1.0/pango/pango.h:46:
[ ] In file included from /snap/flutter/current/usr/include/pango-1.0/pango/pango-utils.h:25:
[ ] /snap/flutter/current/usr/include/stdio.h:41:10: fatal error: 'bits/libio.h' file not found
[ ] #include <bits/libio.h>
[ ] ^~~~~~~~~~~~~~
[ ] 1 error generated.
[ +31 ms] [4/6] Building CXX object CMakeFiles/counter.dir/main.cc.o
[ ] FAILED: CMakeFiles/counter.dir/main.cc.o
[ ] /snap/flutter/21/usr/bin/clang++ -I/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral -isystem /snap/flutter/current/usr/include -isystem /snap/flutter/current/usr/include/gtk-3.0 -isystem /snap/flutter/current/usr/include/at-spi2-atk/2.0 -isystem /snap/flutter/current/usr/include/at-spi-2.0 -isystem /snap/flutter/current/usr/include/dbus-1.0 -isystem /snap/flutter/current/usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem /snap/flutter/current/usr/include/gio-unix-2.0 -isystem /snap/flutter/current/usr/include/cairo -isystem /snap/flutter/current/usr/include/pango-1.0 -isystem /snap/flutter/current/usr/include/harfbuzz -isystem /snap/flutter/current/usr/include/atk-1.0 -isystem /snap/flutter/current/usr/include/pixman-1 -isystem /snap/flutter/current/usr/include/freetype2 -isystem /snap/flutter/current/usr/include/libpng16 -isystem /snap/flutter/current/usr/include/gdk-pixbuf-2.0 -isystem /snap/flutter/current/usr/include/glib-2.0 -isystem /snap/flutter/current/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -Wall -Werror -pthread -MD -MT CMakeFiles/counter.dir/main.cc.o -MF CMakeFiles/counter.dir/main.cc.o.d -o CMakeFiles/counter.dir/main.cc.o -c /home/fabio/Projects/scratches/counter/linux/main.cc
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/main.cc:1:
[ ] In file included from /home/fabio/Projects/scratches/counter/linux/my_application.h:4:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gtk/gtk.h:30:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdk.h:32:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30:
[ ] In file included from /snap/flutter/current/usr/include/gtk-3.0/gdk/gdktypes.h:35:
[ ] In file included from /snap/flutter/current/usr/include/pango-1.0/pango/pango.h:46:
[ ] In file included from /snap/flutter/current/usr/include/pango-1.0/pango/pango-utils.h:25:
[ ] /snap/flutter/current/usr/include/stdio.h:41:10: fatal error: 'bits/libio.h' file not found
[ ] #include <bits/libio.h>
[ ] ^~~~~~~~~~~~~~
[ ] 1 error generated.
[ ] ninja: build stopped: subcommand failed.
[ +283 ms] Exception: Build process failed
[ +4 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:460:9)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:869:18)
#3 _rootRunUnary (dart:async/zone.dart:1198:47)
#4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#11 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#12 _rootRunUnary (dart:async/zone.dart:1198:47)
#13 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#14 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#15 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#16 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#17 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#18 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#19 _rootRun (dart:async/zone.dart:1190:13)
#20 _CustomZone.run (dart:async/zone.dart:1093:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#22 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[ +12 ms] "flutter run" took 5,203ms.
[ +75 ms] ensureAnalyticsSent: 74ms
[ ] Running shutdown hooks
[ ] Shutdown hook priority 4
It seems like it cannot find system libraries needed for the Linux platform.
Running instead in a terminal (even in Android studio) the command flutter run --verbose
, the build succeeds and the program runs. The output is the following:
[ +83 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +21 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] f25bd9c55c48c139524139b477d04b13e9f36b2c
[ ] executing: [/home/fabio/snap/flutter/common/flutter/] git tag --contains HEAD
[ +128 ms] Exit code 0 from: git tag --contains HEAD
[ +1 ms] 1.21.0-1.0.pre
1.21.0-5.0.pre
[ +6 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/dev
[ ] executing: [/home/fabio/snap/flutter/common/flutter/] git ls-remote --get-url origin
[ +2 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +29 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[ +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] dev
[ +28 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +7 ms] executing: /home/fabio/Android/Sdk/platform-tools/adb devices -l
[ +29 ms] List of devices attached
[ +3 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +133 ms] Generating /home/fabio/Projects/scratches/counter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +63 ms] Starting incremental build...
[ +1 ms] Initializing file store
[ +6 ms] Skipping target: gen_localizations
[ +4 ms] complete
[ +3 ms] Launching lib/main.dart on Linux in debug mode...
[ +4 ms] /home/fabio/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/fabio/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot
--sdk-root /home/fabio/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata
-Ddart.developer.causal_async_stacks=true --output-dill /tmp/flutter_tools.YCJBZC/flutter_tool.TGEZVB/app.dill --packages .packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation
--filesystem-scheme org-dartlang-root --initialize-from-dill build/cache.dill.track.dill
[ +13 ms] Building Linux application...
[ +7 ms] <- compile package:counter/main.dart
[ +2 ms] executing: [build/linux/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug /home/fabio/Projects/scratches/counter/linux
[ +38 ms] -- Configuring done
[ +4 ms] -- Generating done
[ ] -- Build files have been written to: /home/fabio/Projects/scratches/counter/build/linux/debug
[ +2 ms] executing: ninja -C build/linux/debug install
[ +4 ms] ninja: Entering directory `build/linux/debug'
[ +1 ms] ninja: warning: bad deps log signature or version; starting over
[+4371 ms] [1/6] Generating /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/libflutter_linux_gtk.so,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_engine.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_call.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_method_response.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_value.h, /home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/fl_view.h,
/home/fabio/Projects/scratches/counter/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[ +3 ms] [ +94 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] [ +22 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] [ ] f25bd9c55c48c139524139b477d04b13e9f36b2c
[ ] [ ] executing: [/home/fabio/snap/flutter/common/flutter/] git tag --contains HEAD
[ ] [ +132 ms] Exit code 0 from: git tag --contains HEAD
[ ] [ ] 1.21.0-1.0.pre
[ ] 1.21.0-5.0.pre
[ ] [ +7 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ ] [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] [ ] origin/dev
[ ] [ ] executing: [/home/fabio/snap/flutter/common/flutter/] git ls-remote --get-url origin
[ ] [ +3 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] [ ] https://github.com/flutter/flutter.git
[ ] [ +29 ms] executing: [/home/fabio/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[ ] [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] [ ] dev
[ ] [ +29 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ +4 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] [ +71 ms] Initializing file store
[ ] [ +11 ms] Done initializing file store
[ ] [ +26 ms] Skipping target: gen_localizations
[ ] [+1197 ms] Skipping target: kernel_snapshot
[ ] [+1584 ms] Skipping target: unpack_linux
[ ] [ +258 ms] debug_bundle_linux_assets: Starting due to {InvalidatedReason.inputChanged}
[ ] [ +102 ms] debug_bundle_linux_assets: Complete
[ ] [ +260 ms] Persisting file store
[ ] [ +6 ms] Done persisting file store
[ ] [ +5 ms] build succeeded.
[ ] [ +6 ms] "flutter assemble" took 3,541ms.
[ ] [ +83 ms] ensureAnalyticsSent: 80ms
[ ] [ +1 ms] Running shutdown hooks
[ ] [ ] Shutdown hooks complete
[ ] [ ] exiting with code 0
[ +333 ms] [2/6] Building CXX object CMakeFiles/counter.dir/main.cc.o
[ +1 ms] [3/6] Building CXX object CMakeFiles/counter.dir/my_application.cc.o
[ +3 ms] [4/6] Building CXX object CMakeFiles/counter.dir/flutter/generated_plugin_registrant.cc.o
[ +68 ms] [5/6] Linking CXX executable counter
[ ] [5/6] Install the project...
[ +7 ms] -- Install configuration: "Debug"
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/counter
[ ] -- Set runtime path of "/home/fabio/Projects/scratches/counter/build/linux/debug/bundle/counter" to "$ORIGIN/lib"
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/icudtl.dat
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/lib/libflutter_linux_gtk.so
[ +98 ms] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/NOTICES
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/FontManifest.json
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/kernel_blob.bin
[ +24 ms] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/AssetManifest.json
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/packages
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/packages/cupertino_icons
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/fonts
[ ] -- Installing: /home/fabio/Projects/scratches/counter/build/linux/debug/bundle/data/flutter_assets/fonts/MaterialIcons-Regular.ttf
[ +8 ms] Building Linux application... (completed in 5.0s)
[ +370 ms] Observatory URL on device: http://127.0.0.1:40955/T2qKsNx59Mc=/
[ +4 ms] Caching compiled dill
[ +17 ms] Connecting to service protocol: http://127.0.0.1:40955/T2qKsNx59Mc=/
[ +94 ms] Successfully connected to service protocol: http://127.0.0.1:40955/T2qKsNx59Mc=/
[ ] Waiting for Linux to report its views...
[ +4 ms] Waiting for Linux to report its views... (completed in 3ms)
[ +9 ms] DevFS: Creating new filesystem on the device (null)
[ +12 ms] DevFS: Created new filesystem on the device (file:///tmp/counterEMCVVS/counter/)
[ +2 ms] Updating assets
[ +66 ms] Syncing files to device Linux...
[ +1 ms] Scanning asset files
[ +1 ms] <- reset
[ ] Compiling dart to kernel with 0 updated files
[ ] <- recompile package:counter/main.dart 574bc183-2a09-4815-9cb2-fa062e0bb12c
[ ] <- 574bc183-2a09-4815-9cb2-fa062e0bb12c
[ +75 ms] Updating files
[ +46 ms] DevFS: Sync finished
[ ] Syncing files to device Linux... (completed in 127ms)
[ ] Synced 0.9MB.
[ ] <- accept
[ ] Connected to _flutterView/0x1563570.
[ ] Flutter run key commands.
[ +1 ms] r Hot reload. 🔥🔥🔥
[ +1 ms] R Hot restart.
[ ] h Repeat this help message.
[ ] d Detach (terminate "flutter run" but leave application running).
[ ] c Clear the screen
[ ] q Quit (terminate the application on the device).
[ ] An Observatory debugger and profiler on Linux is available at: http://127.0.0.1:40955/T2qKsNx59Mc=/
[+5474 ms] Service protocol connection closed.
[ ] Lost connection to device.
[ +1 ms] DevFS: Deleting filesystem on the device (file:///tmp/counterEMCVVS/counter/)
[ +258 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[ +6 ms] "flutter run" took 11,736ms.
[ +95 ms] ensureAnalyticsSent: 79ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +4 ms] Shutdown hooks complete
[ ] exiting with code 0
Version info
Result using Tools > Flutter > Flutter Doctor
/home/fabio/snap/flutter/common/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel dev, 1.21.0-1.0.pre, on Linux, locale en_US.UTF-8)
• Flutter version 1.21.0-1.0.pre at /home/fabio/snap/flutter/common/flutter
• Framework revision f25bd9c55c (3 weeks ago), 2020-07-14 20:26:01 -0400
• Engine revision 99c2b3a245
• Dart version 2.9.0 (build 2.9.0-21.0.dev 20bf2fcf56)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /home/fabio/Android/Sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /snap/android-studio/91/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Linux toolchain - develop for Linux desktop
• clang version 10.0.0-4ubuntu1
• cmake version 3.16.3
• ninja version 1.10.0
• pkg-config version 0.29.1
[✓] Android Studio (version 4.0)
• Android Studio at /snap/android-studio/91/android-studio
• Flutter plugin version 48.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • Linux
• No issues found!
Process finished with exit code 0
Result using flutter doctor -v
$ flutter doctor -v
[✓] Flutter (Channel dev, 1.21.0-1.0.pre, on Linux, locale en_US.UTF-8)
• Flutter version 1.21.0-1.0.pre at /home/fabio/snap/flutter/common/flutter
• Framework revision f25bd9c55c (3 weeks ago), 2020-07-14 20:26:01 -0400
• Engine revision 99c2b3a245
• Dart version 2.9.0 (build 2.9.0-21.0.dev 20bf2fcf56)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /home/fabio/Android/Sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /snap/android-studio/91/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Linux toolchain - develop for Linux desktop
• clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
• cmake version 3.10.2
• ninja version 1.8.2
• pkg-config version 0.29.1
[✓] Android Studio (version 4.0)
• Android Studio at /snap/android-studio/91/android-studio
• Flutter plugin version 48.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • Linux
• No issues found!
Using Ubuntu 20.04, all updates applied, using snaps for both Android studio and Flutter
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Android Build Failing with Command, but not in Android Studio
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with...
Read more >Build your app from the command line | Android Developers
Find out how you can execute all the build tasks available to your Android project using the Gradle wrapper command line tool.
Read more >Conditional navigation - Android Developers
When designing navigation for your app, you might want to navigate to one destination versus another based on conditional logic.
Read more >Migrate to the Navigation component - Android Developers
Important: To ensure success, approach migration as an iterative process, thoroughly testing your app with each step.
Read more >AudioManager - Android Developers
Stay organized with collections Save and categorize content based on your ... to call screening applications but other audio use cases are still...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this is related to this issue: https://github.com/kenvandine/flutter-snap/issues/8.
To summarize what I think is going on:
flutter
command from the snap installed flutter sdk -$HOME/snap/flutter/common/flutter/bin/flutter
/snap/flutter/current/flutter.sh
So, the flutter sdk from the snap won’t be able to build flutter desktop apps; tools instead have to call the /snap/flutter/current/flutter.sh script, which sets up the path and calls
flutter
from the sdk.I think what would be useful here is to have some way for the flutter sdk installed via snap to be configured w/ knowledge of the necessary env. vars / paths - for tools and users to be able to call the
<flutter-sdk>/bin/flutter
sdk entrypoint. I’ll make a comment to that effect on the flutter-snap repo issue.@MarcusTomlinson can you please take a look at this?