xamarin / AndroidSupportComponents

Xamarin bindings for Android Support libraries - For AndroidX see https://github.com/xamarin/AndroidX
MIT License
146 stars 56 forks source link

Xamarin.Android.Support.Annotations - Build error MSB4044 #129

Closed lrobie closed 5 years ago

lrobie commented 5 years ago

Xamarin.Android Version (eg: 6.0):

9.0

Operating System & Version (eg: Mac OSX 10.11):

10.13.6

Support Libraries Version (eg: 23.3.0):

28.0.0-preview8

Describe your Issue:

The Xamarin.Android.Support.Annotations nuget package causes a build error:

Xamarin.Android.Support.Annotations.targets(3,3): Error MSB4044: The "VerifyVersionsTask" task was not given a value for the required parameter "AndroidSdkBuildToolsVersion". (MSB4044)

this happens in the other V28 preview versions. It didn't happen in V27.

It doesn't happen in any other Xamarin support packages

Steps to Reproduce (with link to sample solution if possible):

In a Xamarin Android binding project or App project, include the nuget package Xamarin.Android.Support.Annotations.

Workaround

Go into the package directory ../Xamarin.Android.Support.Annotations.28.0.0-preview8/build/monoandroid90

edit the file Xamarin.Android.Support.Annotations.targets

remove the Target block that begins: <Target Name="_VerifyXamarinAndroidSupportVersions" AfterTargets="ResolveAssemblyReferences">

Redth commented 5 years ago

Is this in a binding project?

lrobie commented 5 years ago

yes (per steps to reproduce) it happens in a binding project and an App project

Redth commented 5 years ago

@lrobie https://github.com/xamarin/AndroidSupportComponents/issues/124#issuecomment-440782832

This is an upstream issue in Xamarin.Android, but that comment shows how to work around it for now.

lrobie commented 5 years ago

thanks @Redth will give that a try.

nguyenthanhliemfc commented 5 years ago

@lrobie Is it work for you???

lrobie commented 5 years ago

@nguyenthanhliemfc been awhile but i think it did or Xamarin updates since then fixed it.