ilgb
ilgb

Reputation: 1

Xamarin Android : "Bundle assemblies into native code" throw error on TFS build server

I got this error when I build Xamarin Android solution on TFS build server with project option "Bundle assemblies into native code" enabled :

"C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets (1991): Missing Android NDK toolchains directory '\toolchains'. Please install the Android NDK."

I checked Visual Studio Xamarin options on server and NDK path is defined correctly.

Upvotes: 0

Views: 1027

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51173

If you are getting error with Release build, please try below method mentioned by David Howard

Fixed: As an update if anyone else having this problem when building Release (that the NDK \toolchains is missing) it appears that mkbundle is broken.

The root cause is that "MakeBundleNativeCodeExternal" is true for release and false for Debug. Although this appears as a licensing issue, my build agent has an Enterprise licence installed.

Disabling "MakeBundleNativeCodeExternal" in Release build by editing the Android project in notepad, seach for 'BundleAssemblies' - and change the 'True' under Release configuration section to ' False' save, build Release, works

Source: Missing Android NDK toolchains directory

Upvotes: 0

Related Questions