Reputation: 3888
I'm trying to build a Xamarin.Android project targeting Android P (API 28) using Azure DevOps/VSTS. The build is failing because it doesn't have API 28 added to the Android SDK on the build server. How would I go about setting that up on the build server? On my local instance I would setup the Android SDK using Tools -> Open Android SDK Manager, but that process requires using the GUI which I don't have on the build server.
The exact build error is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(627,2): Error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. (C:\Program Files (x86)\Android\android-sdk\platforms\android-28\android.jar missing.)
Upvotes: 3
Views: 2170
Reputation: 36
I found success using windows-2019 Ensure you are using NuGet 5.8 (I know frustrating this isn't the error)
Upvotes: 2
Reputation: 937
Are you using the Azure Pipelines hosted build agent? It should already have API 28 installed. If that's not working, please file an issue in that repo.
On a private agent, you can use Android's sdkmanager to install API 28.
Upvotes: 1