Closed ikey4u closed 3 years ago
Can you please try this with flutter master?
$ flutter channel master
$ flutter upgrade
$ cargo clean
$ cargo run
Stable Flutter version is not supported at this point.
Can you please try this with flutter master?
$ flutter channel master $ flutter upgrade $ cargo clean $ cargo run
Stable Flutter version is not supported at this point.
I have upgraded flutter to master version
Flutter 2.3.0-17.0.pre.299 • channel master • https://github.com/flutter/flutter.git
Framework • revision db528a24a3 (24 minutes ago) • 2021-06-10 11:52:42 -0400
Engine • revision 6e03bbd42c
Tools • Dart 2.14.0 (build 2.14.0-196.0.dev)
but now cargo run
failed to build the example project, the error is showed below(too long, truncated):
Caused by:
process didn't exit successfully: `/home/user/DevSpace/nativeshell-examples/target/debug/build/nativeshell_examples-c9a8405bbd49ffab/build-script-build` (exit code: 101)
--- stdout
** Build failed with error **
External Tool Failed!
Status: ExitStatus(ExitStatus(256))
Command: "\"flutter\" \"assemble\" \"--output=.\" \"--define=BuildMode=debug\" \"--define=TargetPlatform=linux-x64\" \"--define=DarwinArchs=\" \"--define=TargetFile=../../../../../../lib/main.dart\" \"-v\" \"--suppress-analytics\" \"kernel_snapshot\" \"copy_assets\""
Stderr:
[ +127 ms] ../../../../../../lib/main.dart:1:8: Error: Error when reading '../../../../../../../../.usr/flutter/flutter_linux_2.2.1-stable/packages/flutter/lib/material.dart': No such file or directory
try to run flutter pub get
before building it. it looks like flutter packages need to be upgraded. This is normally done by vscode flutter plugin, but if you're not running vscode you may need to do this manually.
try to run
flutter pub get
before building it. it looks like flutter packages need to be upgraded. This is normally done by vscode flutter plugin, but if you're not running vscode you may need to do this manually.
it works, no crash anymore!
@knopp how to hot reload flutter command line in nativeshell?
There are vscode launch configurations in the project that can attach to running app. If you want to do it from command line:
$ flutter attach -d linux --debug-url [observatory url printed at app startup]
i.e.
$ cargo run
...
flutter: Observatory listening on http://127.0.0.1:63604/g3liwgW-epE=/
...
and then
$ flutter attach -d linux --debug-url http://127.0.0.1:63604/g3liwgW-epE=/
Hi, thank you for this awesome project!
Problem
When I run the example, click
Window Management/Show Other Window/Call Method
orDrag & Drop/File Drag Source
, it crashed!Environment Information
My OS is showed below
and version of flutter and rust are given below
Stack Backtrace