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

Error in Android Studio for Windows. arm-linux-androideabi-ar not installed. #667

Closed
ssrlive opened this issue Mar 23, 2022 · 3 comments
Closed
Labels
O-android Operating system: Android

Comments

@ssrlive
Copy link

ssrlive commented Mar 23, 2022

test project: https://github.com/ssrlive/droid-rust/tree/305327eca38d90ae88bb9f99bb8347ae81bad7c9/native-demo

error info

> Task :example:cargoBuildArm FAILED
   Compiling nativedemo v0.0.1 (D:\example\rust)
error: failed to run custom build command for `nativedemo v0.0.1 (D:\example\rust)`

Caused by:
  process didn't exit successfully: `D:\example\rust\target\debug\build\nativedemo-f2364cd6b2bc7cf9\build-script-build` (exit code: 1)
  --- stdout
  TARGET = Some("armv7-linux-androideabi")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-pc-windows-msvc")
  CC_armv7-linux-androideabi = Some("C:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\armv7a-linux-androideabi21-clang.cmd")
  CFLAGS_armv7-linux-androideabi = None
  CFLAGS_armv7_linux_androideabi = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  running: "C:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang.exe" "--target=armv7a-linux-androideabi21" "-O0" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=armv7-linux-androideabi" "-Wall" "-Wextra" "-o" "D:\\example\\rust\\target\\armv7-linux-androideabi\\debug\\build\\nativedemo-867a5358d0ad33cc\\out\\native_app_glue/main.o" "-c" "native_app_glue/main.c"
  exit code: 0
failed to run custom build command for `nativedemo v0.0.1 (D:\example\rust)`

  running: "C:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang.exe" "--target=armv7a-linux-androideabi21" "-O0" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=armv7-linux-androideabi" "-Wall" "-Wextra" "-o" "D:\\example\\rust\\target\\armv7-linux-androideabi\\debug\\build\\nativedemo-867a5358d0ad33cc\\out\\native_app_glue/android_native_app_glue.o" "-c" "native_app_glue/android_native_app_glue.c"
  exit code: 0
  AR_armv7-linux-androideabi = Some("C:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\arm-linux-androideabi-ar")
Caused by:

  running: "C:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\arm-linux-androideabi-ar" "cq" "D:\\example\\rust\\target\\armv7-linux-androideabi\\debug\\build\\nativedemo-867a5358d0ad33cc\\out\\libnative_app_glue.a" "D:\\example\\rust\\target\\armv7-linux-androideabi\\debug\\build\\nativedemo-867a5358d0ad33cc\\out\\native_app_glue/main.o" "D:\\example\\rust\\target\\armv7-linux-androideabi\\debug\\build\\nativedemo-867a5358d0ad33cc\\out\\native_app_glue/android_native_app_glue.o"

  --- stderr


  error occurred: Failed to find tool. Is `C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\24.0.8215888\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ar` installed? (see https://github.com/alexcrichton/cc-rs#compile-time-requirements for help)
@dot-asm
Copy link
Contributor

dot-asm commented Mar 25, 2022

This is likely to be a duplicate of #636. Consider cargo install cargo-apk.

@dvc94ch
Copy link
Contributor

dvc94ch commented Apr 29, 2022

fyi, cargo-apk is slowly being replaced my xbuild. I'd recommend you give that a try first, and let us (xbuild/cargo-apk maintainers) know if you're missing some functionality from cargo-apk.

@thomcc thomcc added the O-android Operating system: Android label Oct 26, 2022
@thomcc
Copy link
Member

thomcc commented Oct 26, 2022

I think this is a duplicate of #636. Feel free to reopen if you think this is inaccurate.

@thomcc thomcc closed this as completed Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-android Operating system: Android
Projects
None yet
Development

No branches or pull requests

4 participants