Bug 24216 - Unable to build any projects due to error XA0020: Could not find mandroid!
Summary: Unable to build any projects due to error XA0020: Could not find mandroid!
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: Highest blocker
Target Milestone: ---
Assignee: Emanuel
: 24229 ()
Depends on:
Reported: 2014-11-02 23:25 UTC by Peter Collins
Modified: 2016-08-03 15:23 UTC (History)
8 users (show)

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

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 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 Peter Collins 2014-11-02 23:25:39 UTC
The mandroid path still appears to be the same, however I am now seeing a warning that mandroid could not be found on project load. This also prevents any builds from succeeding.

Diagnostic build output:

Win 7x64
XVS v3.8 / 64f6a4f (XA 4.20 / 6f7ec52)
Comment 1 Nischal 2014-11-03 02:48:56 UTC
@Peter, Could you please provide me some steps so that I can also reproduc it at my end?
Comment 2 Emanuel 2014-11-03 15:12:21 UTC
Is this error happening when you install the XVS msi in a clean VM, or is it happening when overriding an existent installation?
Comment 3 Peter Collins 2014-11-03 15:17:08 UTC
I had just pulled the latest from v3.8 and installed it over an existing v3.7 installation.
Comment 4 Jonathan Pryor 2014-11-03 16:36:33 UTC
What's the contents of the %ProgramFiles(x86)%\MSBuild\Xamarin\Android? Does it contain mandroid.exe?
Comment 5 Peter Collins 2014-11-03 16:54:47 UTC
> What's the contents of the %ProgramFiles(x86)%\MSBuild\Xamarin\Android?

Here's the results of `dir /Q` for both v3.7 and v3.8:

mandroid.exe is there, and nothing out of the ordinary stands out to me unless I'm missing something?
Comment 6 PJ 2014-11-03 17:12:21 UTC
Info added in comment 5, back to CONFIRMED.
Comment 7 Jonathan Pryor 2014-11-03 17:27:29 UTC
androidtools requires that runtimePath, binPath, and bclPath be found.

runtimePath: Must contain either %ProgramFiles(x86)%\MSBuild\Xamarin\Android\Mono.Android.DebugRuntime-debug.apk or 

Both of these exist.

binPath: Must contain mandroid.exe.

bclPath: Must contain mscorlib.dll. This would normally be %ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0.

As per Comment #5, runtimePath and bclPath are both satisfied. Is bclPath satisfied?

Does %ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll exist?

If it doesn't, then androidtools initialization will fail, and all paths will be null.
Comment 8 Peter Collins 2014-11-03 17:35:16 UTC
We've lost 9 files in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0 between v3.7 and v3.8, including mscorlib.dll:

Comment 9 Peter Collins 2014-11-03 17:35:41 UTC
*** Bug 24229 has been marked as a duplicate of this bug. ***
Comment 10 Emanuel 2014-11-04 17:43:34 UTC
Wrench: bf63d419e070984405af84e2c1f78f6a606c6055
Commit: c4138b25a0517d6a690dedd7e2d77a1c8970a96f
Comment 11 Peter Collins 2014-11-04 18:11:00 UTC
Fix verified in v3.8 / bf63d419e070
Comment 12 ahmedali86 2016-04-24 23:38:27 UTC
i still have the same issue although i have xamarin

-i have a fresh VS2015 Community edition 

-%ProgramFiles(x86)%\MSBuild\Xamarin\Android? Doesn't contain mandroid.exe