Hi,
We have a build issue that happens on our VST build agent only. After upgrading to Xamarin.Forms 2.5.0.91635 version, the local builds are fine. The problem is resources attributes compilation
Error CS0117: 'Resource.Attribute' does not contain a definition for 'MediaRouteControllerWindowBackground'
Error CS0117: 'Resource.Attribute' does not contain a definition for 'mediaRouteBluetoothIconDrawable'
These are just a few of many errors that point out to the attribute definitions missing.
The build engine version:
017-11-28T23:16:38.6544392Z Task : Xamarin.Android
2017-11-28T23:16:38.6544392Z Description : Build an Android app with Xamarin
2017-11-28T23:16:38.6544392Z Version : 1.119.0
2017-11-28T23:16:38.6544392Z Author : Microsoft Corporation
[
2017-11-28T23:16:41.1486756Z ##[debug] {
2017-11-28T23:16:41.1506288Z ##[debug] "instanceId": "a8029945",
2017-11-28T23:16:41.1525820Z ##[debug] "installDate": "2017-09-14T02:54:40Z",
2017-11-28T23:16:41.1545352Z ##[debug] "installationName": "VisualStudio/15.4.5+27004.2010",
2017-11-28T23:16:41.1574650Z ##[debug] "installationPath": "D:\Program Files (x86)\Microsoft Visual Studio 2017\Enterprise",
2017-11-28T23:16:41.1603948Z ##[debug] "installationVersion": "15.4.27004.2010",
2017-11-28T23:16:41.1633246Z ##[debug] "displayName": "Visual Studio Enterprise 2017",
2017-11-28T23:16:41.1652778Z ##[debug] "description": "Microsoft DevOps solution for productivity and coordination across teams of any size",
2017-11-28T23:16:41.1867630Z ##[debug]]
My problem seems to be that build task does not find the correct android level:
_BuildSdkCache:
2017-11-28T23:16:42.4348578Z sdk Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory not found.
2017-11-28T23:16:42.4368110Z sdk Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory found:
2017-11-28T23:16:42.4368110Z Path does not contain ndk-stack in . (C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r11c).
2017-11-28T23:16:42.4397408Z sdk Looking for Android SDK..
2017-11-28T23:16:42.4397408Z sdk Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory not found.
2017-11-28T23:16:42.4407174Z sdk Key HKLM\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory found:
2017-11-28T23:16:42.4407174Z Path does not contain adb in \platform-tools (C:\android-sdk-windows).
2017-11-28T23:16:42.4407174Z sdk Key HKCU\SOFTWARE\Xamarin\MonoAndroid\PrivateAndroidSdkPath not found.
2017-11-28T23:16:42.4407174Z sdk Key HKCU\SOFTWARE\Android SDK Tools\Path not found.
2017-11-28T23:16:42.4407174Z sdk Key HKLM\SOFTWARE\Android SDK Tools\Path found:
2017-11-28T23:16:42.4416940Z Path contains adb in \platform-tools (C:\Program Files (x86)\Android\android-sdk).
2017-11-28T23:16:42.4436472Z sdk Looking for Android NDK..
2017-11-28T23:16:42.4436472Z sdk Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory found:
2017-11-28T23:16:42.4436472Z Path does not contain ndk-stack in . (C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r11c).
2017-11-28T23:16:42.4446238Z sdk Key HKLM\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory not found.
2017-11-28T23:16:42.4573196Z Found Android SDK. API levels: 19, 21, 22, 23
2017-11-28T23:16:42.4875942Z _SetLatestTargetFrameworkVersion:
2017-11-28T23:16:42.4885708Z sdk Looking for Android NDK..
2017-11-28T23:16:42.4885708Z sdk Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory found:
2017-11-28T23:16:42.4885708Z Path does not contain ndk-stack in . (C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r11c).
2017-11-28T23:16:42.4885708Z sdk Key HKLM\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory not found.
2017-11-28T23:16:42.4895474Z Found Android SDK. API levels: 19, 21, 22, 23
I am targeting Level 26, and I have it installed on VST agent, my resources are compiled with:
C:\Program Files (x86)\Android\android-sdk\build-tools\26.0.3\aapt.exe package -f -m -M \B\V11_temp\usura1uo.q3a\manifest\AndroidManifest.xml ...
So, I think the reason is that somehow the build is still using outdated sdk for the build but aapt is using the newer resource compiler?
How do I get the VST agent to refresh/update to the latest version? Could this be as simple as machine reboot
Thanks.