-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[bug] Cannot build for android #6493
Comments
I modified the generated project and removed armv7 arch. It is resolved temporarily. |
I wasn't able to reproduce this at all with a new project, try recreating the project from scratch. |
I've installed a new NDK and could still reproduce that. However I've found it an NDK issue. I've opened one for NDK: android/ndk#1856 |
We're seeing this issue on CI: https://github.com/tauri-apps/tauri/actions/runs/4774744796/jobs/8488622948?pr=6708#step:13:783 |
@Berrysoft may I ask how you managed to remove the armv7 arch? I have the same problem and I'm new to android dev. |
add "targetList=aarch64,x86_64" in gradle.properties |
I choose to modify NDK following this comment: android/ndk#1856 (comment) |
Describe the bug
When packaging for android, tauri-cli tries to build for armv7. Actually I don't need that target, but don't know how to turn it off neither. It finds the right linker in the Android NDK -
armv7a-linux-androideabi24-clang.cmd
, but adds param-march=armv7-a
behind it. Cargo calls CMD to execute the link command, and CMD refuse a param like"-march=armv7-a"
. It just throws a line of errorThe param
-march=armv7-a
comes from thearmv7-linux-androideabi
target of rustc.https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs#L13
I don't know why it calls CMD, and don't know why it adds such a param, and even don't know how to remove it.
Reproduction
If you feel it is complicated, start a cmd. Suppose your linker is
%FOO%\armv7a-linux-androideabi24-clang.cmd
, typeYou will find that it works if you remove the quotes.
"%FOO%\\armv7a-linux-androideabi24-clang.cmd" -march=armv7-a
Expected behavior
Build successfully.
Or give us an option to disable armv7 target.
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: