Comments (11)
This one is a bit tricky. Flutter doesn't ship with ARM64/Universal version of engine yet. The engine can now build natively for ARM64, but the build infrastructure is not yet setup to produce universal binaries: flutter/flutter#81488
So in your case cargo produces ARM64 build, but can't link with X86_64 engine.
You can try running the project with cargo run --target=x86_64-apple-darwin
to see if it works. It should in theory but I haven't tried this yet, the build script might needs some fixing.
Alternatively you can build your own ARM64 version of flutter engine, but that's a bit more work.
from nativeshell.
I published NativeShell 0.1.1. Can you update the examples and try running it again?
from nativeshell.
Btw. You might need to install x86_64 toolchain to rust before you do this:
rustup target add x86_64-apple-darwin
Since you're cross-compiling from aarch64 to x86_64.
from nativeshell.
Thanks for the quick reply! It seems like that did the trick, but I'm getting another error that I think is unrelated.
2021-06-03 15:35:12.300 app_template[44200:579050] *** Assertion failure in -[FlutterViewController configureTrackingArea], ../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm:399
fatal runtime error: Rust cannot catch foreign exceptions
zsh: abort cargo run --target=x86_64-apple-darwin
from nativeshell.
That one is indeed unrelated. Which flutter version do you have installed?
from nativeshell.
2.3.0-17.0.pre.180 master.
Flutter doctor:
[✓] Flutter (Channel master, 2.3.0-17.0.pre.180, on macOS 11.3 20E232 darwin-arm, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.56.2)
[✓] Connected device (3 available)
from nativeshell.
I see. The assertion to [FlutterViewController configureTrackingArea] was added just two days ago so I missed it. I'll look into it now.
from nativeshell.
Ah, you're right. Is there any way to manually configure the location of the Flutter SDK that nativeshell uses?
from nativeshell.
It uses current master :) It just that I haven't updated mine in a week and it so happened that there was a breaking change I didn't expect. Eventually it should work with dev/stable.
I should able to publish updated NativeShell crate that fixes the crash in maybe 20 minutes.
from nativeshell.
Gotcha! Since this new issue is completely unrelated I guess I can close this now.
from nativeshell.
Works like a charm! Thanks for the help!
from nativeshell.
Related Issues (20)
- Crashes on multiple monitors in Windows HOT 4
- Is there any way to lower the minimum supported version of macOS HOT 1
- way to run existing flutter code HOT 4
- How to specify libflutter location
- Frameless windows are not resizable on macOS
- Fails to build on apple silicon with Flutter 3.0.0 HOT 2
- The Flutter Attach to Process gets stuck on Waiting... HOT 3
- Invalid read causes segmentation fault HOT 3
- std::rc::Weak<ContextImpl>` cannot be sent between threads safely
- std::rc::Weak<ContextImpl>` cannot be sent between threads safely
- MenuItem clash with flutter widget of the same name HOT 1
- Getting an error when trying to run the examples HOT 2
- Build Error on MacOS 13.2.1 - cargo run or cargo run --release unable to build and run the flutter app for example provided
- Issues with native plugin `media_kit` HOT 2
- Latest SharedPreferences not working HOT 1
- Jitter when resizing on Windows when frame is `WindowFrame.noTitle` HOT 1
- Unable to build sample project HOT 2
- [super_context_menu] Change/Remove Progress Indicator for DeferredMenuElement
- Calling dart from rust side?
- Support current stable version of Flutter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativeshell.