0
We develop apps for iOS and Android using Visual Studio 2017 / Xamarin. Using Jenkins on a Mac Mini, we build the apps nightly and run UI tests.
But the Android build sometimes fails with the error:
XA5300: Error finding Xamarin.Android SDK
But if I run the same build a few minutes later, it may work ok (without changing the sources). It may also not work but eventually it will work.
So the build sometimes works and sometimes fails. It seems random. The actual build command is as follows (in Jenkins):
PATH=$PATH:/usr/local/share/dotnet;export PATH
PATH=$PATH:/Library/Frameworks/Mono.framework/Commands; export PATH
cd $WORKSPACE
nuget restore myApp.sln
Sleep 5
msbuild myApp.sln /t:restore /p:Configuration="Jenkins"
Sleep 5
msbuild myApp.sln /t:build /p:Configuration="Jenkins" /p:PlatformTarget="AnyCPU"
Sleep 5
msbuild $WORKSPACE/myApp/myApp.Android/myApp.Android.csproj /t:SignAndroidPackage /p:configuration="Jenkins" /p:PlatformTarget="AnyCPU"
Fairly simple really. The correct android sdk path is specified in
users/.config/xbuild/monodroid-config.xml.
Has anyone a suggestion as to how I can solve this problem? Thanks, Sean
Manual build or a Jenkins build when it works the second time? – Ramhound – 2019-01-16T13:28:15.207
I use Jenkins each time to run the build – jpc – 2019-01-17T11:03:27.783
Have you tried changing the order of the build? – Ramhound – 2019-01-17T12:41:13.843