GithubHelp home page GithubHelp logo

Comments (11)

knopp avatar knopp commented on July 24, 2024 1

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.

knopp avatar knopp commented on July 24, 2024 1

I published NativeShell 0.1.1. Can you update the examples and try running it again?

from nativeshell.

knopp avatar knopp commented on July 24, 2024

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.

wilsonowilson avatar wilsonowilson commented on July 24, 2024

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.

knopp avatar knopp commented on July 24, 2024

That one is indeed unrelated. Which flutter version do you have installed?

from nativeshell.

wilsonowilson avatar wilsonowilson commented on July 24, 2024

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.

knopp avatar knopp commented on July 24, 2024

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.

wilsonowilson avatar wilsonowilson commented on July 24, 2024

Ah, you're right. Is there any way to manually configure the location of the Flutter SDK that nativeshell uses?

from nativeshell.

knopp avatar knopp commented on July 24, 2024

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.

wilsonowilson avatar wilsonowilson commented on July 24, 2024

Gotcha! Since this new issue is completely unrelated I guess I can close this now.

from nativeshell.

wilsonowilson avatar wilsonowilson commented on July 24, 2024

Works like a charm! Thanks for the help!

from nativeshell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.