Hi all.
I have an Android project which, when compiled from the command line, on Windows, under msBuild, compiles and produces an apk successfully.
However when I try compiling the same project on a Mac, under xbuild i get the following:
mobileapps:~ build$ xbuild /p:Configuration=Release /property:DefineConstants="MOCK_SERVICES,DEBUG,SIT1" /verbosity:normal /t:SignAndroidPackage "/Users/build/Desktop/SBG.NBOL.Core/SBG.NBOL.Tablet.Droid/SBG.NBOL.Tablet.Droid.csproj" XBuild Engine Version 12.0 Mono, Version 4.2.3.0 Copyright (C) 2005-2013 Various Mono authors Build started 2016-03-31 09:04:02 AM. __________________________________________________ Project "/Users/build/Desktop/SBG.NBOL.Core/SBG.NBOL.Tablet.Droid/SBG.NBOL.Tablet.Droid.csproj" (default target(s)): Target RestorePackages: Executing: mono --runtime=v4.0.30319 "../.nuget/NuGet.exe" install "/Users/build/Desktop/SBG.NBOL.Core/SBG.NBOL.Tablet.Droid/packages.config" -source "" -RequireConsent -solutionDir "../" Restoring NuGet packages... To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. Feeds used: /Users/build/.local/share/NuGet/Cache /Users/build/.nuget/packages/ https://api.nuget.org/v3/index.json All packages listed in /Users/build/Desktop/SBG.NBOL.Core/SBG.NBOL.Tablet.Droid/packages.config are already installed. Target _BuildSdkCache: Skipping target "_BuildSdkCache" because its outputs are up-to-date. Target _CheckProjectItems: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task CheckProjectItems: ApplicationName='C:\Program Files (x86)\MSBuild\Xamarin\Android/mandroid', CommandLine='-d', CurrentDirectory='/', Native error= Cannot find the specified file Build FAILED. Errors: /Users/build/Desktop/SBG.NBOL.Core/SBG.NBOL.Tablet.Droid/SBG.NBOL.Tablet.Droid.csproj (default targets) -> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_CheckProjectItems target) -> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task CheckProjectItems: ApplicationName='C:\Program Files (x86)\MSBuild\Xamarin\Android/mandroid', CommandLine='-d', CurrentDirectory='/', Native error= Cannot find the specified file 0 Warning(s) 1 Error(s) Time Elapsed 00:00:01.6360070
Currently downloading Mono's MDK again.
Anyone know whats happening here?
Regards
Aiden Strydom
Answers
Does your project file use a custom build step or custom MSBuild targets file or have you defined the path to mandroid as a property somewhere? It looks like something is trying to run MonoAndroid on the Mac but is using the path to it as though it was on Windows:
I would try verbosity:diagnostic to see if any properties are defined and also look at the project file to see what is imported.
Hi Matt, thanks for the response. No - no custom build step. And the
csproj
was copied along all the other files from the windows box to the mac. But i noticed the same reference tomandroid
as a windows path. Today's attempt is to condition the build with a osx pathSo xbuild attempts to execute
CheckProjectItems
inXamarin.Android.Common.Targets
: the output of the diagnostic build is:The excerpt from
Xamarin.Android.Common.targers
And the associative error (taken from above) for
JavaSourceFiles
is:Busy reinstalling Xamarin on the Mac.
Here's to hoping.
If that does not work I would file a bug on bugzilla with the full diagnostic output and the details about what version of Xamarin.Android you have installed.