1

Have tried endless different options in trying to create a Release Android archive for a Xamarin Forms project using Mac Visual Studio. I'm selecting Archive For Publishing from the Build menu. I always get the same or similar error :

error XA5101: C compiler for target Arm64 was not found. Tried paths: "/Users/XXX/Library/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64-linux-android-gcc; /Users/XXX/Library/Android/sdk/ndk-bundle/prebuilt/darwin-x86_64/bin/gcc"

Ive tried selecting different Android ABI options, eg x86, arm64-v8a, x86_64. Ive tried changing linker options.

I check the path given in the error, and indeed the actual file referred to is missing, but I've installed recent Android NKDs etc. Everything else works fine, such as building and sending to an Android phone.

Any pointers for this much appreciated.

3
  • Luke did you try this? bugzilla.xamarin.com/show_bug.cgi?id=42257 .It seems to be an old issue don't understand why you are seen it now.
    – pinedax
    Mar 22, 2019 at 22:58
  • @pinedax thanks for the pointer, yes looks like the same thing
    – Luke Smith
    Mar 23, 2019 at 6:09
  • Have same issue if choose "Bundle assemblies into native code". Works fine if I turn it off. Please post if you find solution. May 15, 2019 at 15:11

1 Answer 1

0

I have same issue on Windows. It only appears if "Bundle assemblies into native code" flag turned on.

I found this solution: https://forums.xamarin.com/discussion/147332/which-version-of-ndk-should-we-use-not-latest

You have to download earlier version of Android ndk (17c) and point to that your Visual Studio. Then it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.