Bug 11176 - AndroidNdkDirectory not set for a regular project
Summary: AndroidNdkDirectory not set for a regular project
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.8.x
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-03-15 04:57 UTC by Txus Ordorika
Modified: 2013-07-01 23:58 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Build output copied from xamarin. partially translated. (24.65 KB, text/x-log)
2013-03-15 04:57 UTC, Txus Ordorika
Compiler not found, when it is loaded (59.41 KB, image/png)
2013-03-15 07:38 UTC, Txus Ordorika

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Txus Ordorika 2013-03-15 04:57:56 UTC
Created attachment 3623 [details]
Build output copied from xamarin. partially translated.

Building the application for release, I'm expecting the following error:

C:\Program Files\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1038,3): error MSB4044: No value value for the task "MakeBundleNativeCodeExternal" for the parameter "AndroidNdkDirectory" required.

The application has no NDK code. And Debug mode is built fine.

The build mode is release. The parameters are:
- xamarin studio 4.0.1 (build 9)

	Microsoft .NET 4.0.30319.296
	GTK 2.24.13
	GTK# (

Git revision: Release ID: 400010009
Build date: 2013-03-05 12:49:29Z
Xamarin addins: 181e75e43f263f1c0783b9f7e32234cac6850998

Operating System
Windows 6.1.7601.65536

The parameters about the project being built are:

- target Framework: Android 2.2
- C# language version: Default
- Unsafe code allowed
- Assembly unsigned

Under Android Build:
- Bundled assemblies into native code
- Linker: Link all assemblies.

I attach the build log
Comment 1 Txus Ordorika 2013-03-15 07:38:25 UTC
Created attachment 3626 [details]
Compiler not found, when it is loaded

The screenshot demonstrating the compiler actually exists in the system
Comment 2 Txus Ordorika 2013-03-15 07:39:57 UTC
Comment on attachment 3626 [details]
Compiler not found, when it is loaded

This is the screenshot taken after I've installed the android NDK. Really is it needed?
Comment 3 Txus Ordorika 2013-03-15 08:31:13 UTC
Just as another test, I've put both Debug and Release configurations with the same flags. The operation stops at the target _BuildApkBundle.
Target _BuildApkBundle:

Assemblies: 9
    SupportedAbis: armeabi;armeabi-v7a;x86
    AutoDeps: False
    Error: System.InvalidOperationException: C compiler for target Arm was not found. Expected path is "E:\tools\xamarin\android-ndk-r8d-windows\android-ndk-r8d\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gcc"
       in Xamarin.Android.Tasks.NdkUtil.GetNdkTool(String androidNdkPath, AndroidTargetArch arch, String tool)
       in Xamarin.Android.Tasks.MakeBundleNativeCodeExternal.DoExecute()
       in Xamarin.Android.Tasks.MakeBundleNativeCodeExternal.Execute()
Comment 4 Txus Ordorika 2013-03-20 03:43:15 UTC
Trying to isolate the problem, it raises when the flag  Bundle assemblies into native code is checked. Once it's not checked, the problem dissapears, but unable to compile to native code.
Comment 5 Miguel de Icaza [MSFT] 2013-05-22 16:10:50 UTC
This looks like our mkbundle issue that we are tracking.
Comment 6 Atsushi Eno 2013-07-01 23:58:40 UTC
This "toolchain not found on windows" issue should be gone in the latest alpha release.