Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Android build fails on macOS #65

Closed
dnys1 opened this issue Nov 19, 2021 · 1 comment · Fixed by #67
Closed

Android build fails on macOS #65

dnys1 opened this issue Nov 19, 2021 · 1 comment · Fixed by #67
Assignees

Comments

@dnys1
Copy link

dnys1 commented Nov 19, 2021

Building an app with flutter_wasm currently fails on macOS for me. The gradle output is:

  running: "/Users/nydillon/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/mac" "os" "x-x86_64/bin/aarch64-linux-android29-clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-DCFG_TARGET_OS_ANDROID" "-o" "/Users/nydillon/dev/AmplifyFlutter-DSTestApp/build/flutter_wasm/intermediates/stripped_native_libs/debug/out/lib/arm64-v8a/aarch64-linux-android/release/build/wasmer-vm-2eff8b72936265b4/out/src/trap/handlers.o" "-c" "src/trap/handlers.c"

  --- stderr

  error occurred: Failed to find tool. Is `mac` installed?

It seems that this line produces a string with spaces "mac os x", but regardless is not retrieving the correct value, given this listing of the directory it's searching.

$ ls /Users/nydillon/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt
darwin-x86_64

Manually changing that line of code to search the darwin-x86_64 directory fixes the issue.

@liamappelbe
Copy link
Contributor

I haven't been able to verify that #67 fixes this bug, because my mac seems to think the NDK isn't installed at all. But the fix seems straightforward enough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants