Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build for andorid error on macos #2508

Open
bmd080 opened this issue Jan 20, 2025 · 1 comment
Open

build for andorid error on macos #2508

bmd080 opened this issue Jan 20, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@bmd080
Copy link

bmd080 commented Jan 20, 2025

Describe the bug

flutter run
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
NDK Version: 23.1.7779620
SDK Directory: /Users/admin/Library/Android/sdk
Compile SDK Version: 34
Min SDK Version: 21
INFO: Precompiled binaries are disabled
INFO: Building rust_lib_my_app for aarch64-linux-android
SEVERE: ================================================================================
SEVERE: Cargokit BuildTool failed with error:
SEVERE: --------------------------------------------------------------------------------
SEVERE: External Command: rustup "run" "stable" "cargo" "build" "--manifest-path" "/Users/admin/vscode/my_app/rust/Cargo.toml" "-p" "rust_lib_my_app" "--target" "aarch64-linux-android" "--target-dir" "/Users/admin/vscode/my_app/build/rust_lib_my_app/build"
SEVERE: Returned Exit Code: 101
SEVERE: --------------------------------------------------------------------------------
SEVERE: STDOUT:
SEVERE: --------------------------------------------------------------------------------
SEVERE: STDERR:
SEVERE: Compiling memchr v2.6.4
SEVERE: Compiling libc v0.2.150
SEVERE: Compiling proc-macro2 v1.0.70
SEVERE: Compiling unicode-ident v1.0.12
SEVERE: Compiling version_check v0.9.4
SEVERE: Compiling typenum v1.17.0
SEVERE: Compiling futures-core v0.3.29
SEVERE: Compiling autocfg v1.1.0
SEVERE: Compiling futures-task v0.3.29
SEVERE: error[E0463]: can't find crate for core
SEVERE: |
SEVERE: = note: the aarch64-linux-android target may not be installed
SEVERE: = help: consider downloading the target with rustup target add aarch64-linux-android
SEVERE:
SEVERE: For more information about this error, try rustc --explain E0463.
SEVERE: error: could not compile memchr (lib) due to 1 previous error
SEVERE: warning: build failed, waiting for other jobs to finish...
SEVERE: --------------------------------------------------------------------------------
SEVERE: #0 runCommand (package:build_tool/src/util.dart:121:5)
SEVERE: #1 RustBuilder.build (package:build_tool/src/builder.dart:142:5)
SEVERE:
SEVERE: #2 ArtifactProvider.getArtifacts (package:build_tool/src/artifacts_provider.dart:71:25)
SEVERE:
SEVERE: #3 BuildGradle.build (package:build_tool/src/build_gradle.dart:35:23)
SEVERE:
SEVERE: #4 BuildGradleCommand.runBuildCommand (package:build_tool/src/build_tool.dart:65:5)
SEVERE:
SEVERE: #5 BuildCommand.run (package:build_tool/src/build_tool.dart:37:5)
SEVERE:
SEVERE: #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
SEVERE:
SEVERE: #7 runMain (package:build_tool/src/build_tool.dart:251:5)
SEVERE:
SEVERE: --------------------------------------------------------------------------------
SEVERE: BuildTool arguments: [build-gradle]
SEVERE: ================================================================================

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/admin/vscode/my_app/rust_builder/cargokit/gradle/plugin.gradle' line: 73

  • What went wrong:
    Execution failed for task ':rust_lib_my_app:cargokitCargoBuildRust_lib_my_appDebug'.

Process 'command '/Users/admin/vscode/my_app/rust_builder/cargokit/gradle/../run_build_tool.sh'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 7s
Running Gradle task 'assembleDebug'... 8.2s
Error: Gradle task assembleDebug failed with exit code 1

Steps to reproduce

Hint: A simple way to reproduce is to clone and modify the https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_example/dart_minimal example package according to your needs.

  1. ...
  2. ...
  3. ...

Logs

rustup target list --installed
aarch64-apple-darwin
aarch64-apple-ios-sim
aarch64-linux-android
armv7-linux-androideabi
x86_64-apple-ios

Expected behavior

No response

Generated binding code

OS

No response

Version of flutter_rust_bridge_codegen

No response

Flutter info

flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.1.1 24B91 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.24.3 on channel stable at /Users/admin/fvm/versions/3.24.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (4 个月前), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0-rc3)
    • Android SDK at /Users/admin/Library/Android/sdk
    • Platform android-34, build-tools 36.0.0-rc3
    • ANDROID_HOME = /Users/admin/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] VS Code (version 1.97.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554         • android-arm64  • Android 12 (API 32) (emulator)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 15.1.1 24B91 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 15.1.1 24B91 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 131.0.6778.265

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Version of clang++

No response

Additional context

No response

@bmd080 bmd080 added the bug Something isn't working label Jan 20, 2025
Copy link

welcome bot commented Jan 20, 2025

Hi! Thanks for opening your first issue here! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant