gliheng / flutter-app-template

Desktop flutter app template
MIT License
45 stars 7 forks source link

Could not compile at windows #1

Closed hasanAjsf closed 5 years ago

hasanAjsf commented 5 years ago

I got the below error once running cargo run, I'm at Windows 10:

   Compiling flutter-app v0.1.2 (C:\Users\hasan_yousef\Downloads\flutter-app-template-master\flutter-app-template-master\rust)
error[E0432]: unresolved import `cargo_toml::TomlManifest`
 --> build.rs:3:5
  |
3 | use cargo_toml::TomlManifest;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^ no `TomlManifest` in the root. Did you mean to use `Manifest`?

error[E0277]: the size for values of type `str` cannot be known at compilation time
  --> build.rs:21:9
   |
21 |     let version = manifest.package.metadata.expect("Flutter config in Cargo.toml invalid").flutter.version;
   |         ^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `str`
   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = note: all local variables must have a statically known size
   = help: unsized locals are gated as an unstable feature

error: aborting due to 2 previous errors

Some errors occurred: E0277, E0432.
For more information about an error, try `rustc --explain E0277`.
error: Could not compile `flutter-app`.
warning: build failed, waiting for other jobs to finish...
error: build failed
gliheng commented 5 years ago

Hi, I haven't test this flutter-rs on windows yet. Will work on that when I get my windows very soon.

gliheng commented 5 years ago

Windows compilation is solved. build.py also support building nsis installer on windows.