BrainiumLLC / cargo-mobile

Rust on mobile made easy!
Apache License 2.0
1.24k stars 52 forks source link

cargo mobile init failing on missing tool 'ar' (GNU binutils deprecated in favor of llvm binutils in r23+) #100

Closed pietgk closed 2 years ago

pietgk commented 2 years ago

on macOS trying to create a project with bevy: $ cargo mobile init Generating base project... ... Generating Android Studio project... error: Failed to generate Android cargo config Missing toolar; tried at "/Users/grop/Library/Android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android-ar".

after googling i got: https://github.com/rust-windowing/android-ndk-rs/issues/135

with

Thank you for reporting! NDK r22 deprecated GNU binutils in favour of LLVM's, and those have finally been removed in NDK r23. This should be fixed by https://github.com/rust-windowing/android-ndk-rs/pull/137, please give it a try!

i have not investigated a proper solution.

pietgk commented 2 years ago

Sorry was already reported before with a solution in #53