An outdated of 'Android SDK Build-tools' E

2019-08-02 01:48发布

问题:

When I create a Xamarin project and Build the Droid it goes nice... But when I Add any nuget package using console for example:

Install-Package Acr.UserDialogs Or Install-Package Rg.Plugins.Popup It shows me this On console:

PM> Install-Package Acr.UserDialogs
Attempting to gather dependencies information for package 'Acr.UserDialogs.6.1.1' with respect to project 'TestAcrDialogs.Droid', targeting 'MonoAndroid,Version=v7.0'
Attempting to resolve dependencies for package 'Acr.UserDialogs.6.1.1' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Acr.UserDialogs.6.1.1'
Resolved actions to install package 'Acr.UserDialogs.6.1.1'
Removed package 'Xamarin.Android.Support.Design.23.0.1.3' from 'packages.config'
Successfully uninstalled 'Xamarin.Android.Support.Design.23.0.1.3' from TestAcrDialogs.Droid
Removed package 'Xamarin.Android.Support.v4.23.0.1.3' from 'packages.config'
Successfully uninstalled 'Xamarin.Android.Support.v4.23.0.1.3' from TestAcrDialogs.Droid
Removed package 'Xamarin.Android.Support.v7.AppCompat.23.0.1.3' from 'packages.config'
Successfully uninstalled 'Xamarin.Android.Support.v7.AppCompat.23.0.1.3' from TestAcrDialogs.Droid
Removed package 'Xamarin.Android.Support.v7.CardView.23.0.1.3' from 'packages.config'
Successfully uninstalled 'Xamarin.Android.Support.v7.CardView.23.0.1.3' from TestAcrDialogs.Droid
Removed package 'Xamarin.Android.Support.v7.MediaRouter.23.0.1.3' from 'packages.config'
Successfully uninstalled 'Xamarin.Android.Support.v7.MediaRouter.23.0.1.3' from TestAcrDialogs.Droid
Removed package 'Xamarin.Forms.2.0.0.6482' from 'packages.config'
Successfully uninstalled 'Xamarin.Forms.2.0.0.6482' from TestAcrDialogs.Droid
Adding package 'Acr.Support.2.1.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Acr.Support.2.1.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Acr.Support.2.1.0' to 'packages.config'
Successfully installed 'Acr.Support 2.1.0' to TestAcrDialogs.Droid
Adding package 'AndHUD.1.2.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'AndHUD.1.2.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'AndHUD.1.2.0' to 'packages.config'
Successfully installed 'AndHUD 1.2.0' to TestAcrDialogs.Droid
Adding package 'Splat.1.6.2' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Splat.1.6.2' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Splat.1.6.2' to 'packages.config'
Successfully installed 'Splat 1.6.2' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.v4.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v4.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v4.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.v4 23.3.0' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.v7.CardView.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.CardView.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.CardView.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.v7.CardView 23.3.0' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.v7.RecyclerView.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.RecyclerView.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.RecyclerView.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.v7.RecyclerView 23.3.0' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.Vector.Drawable.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.Vector.Drawable.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.Vector.Drawable.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.Vector.Drawable 23.3.0' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.Animated.Vector.Drawable 23.3.0' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.v7.AppCompat.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.AppCompat.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.AppCompat.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.v7.AppCompat 23.3.0' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.Design.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.Design.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.Design.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.Design 23.3.0' to TestAcrDialogs.Droid
Adding package 'Acr.UserDialogs.6.1.1' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Acr.UserDialogs.6.1.1' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Acr.UserDialogs.6.1.1' to 'packages.config'
Successfully installed 'Acr.UserDialogs 6.1.1' to TestAcrDialogs.Droid
Adding package 'Xamarin.Android.Support.v7.MediaRouter.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.MediaRouter.23.3.0' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Android.Support.v7.MediaRouter.23.3.0' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.v7.MediaRouter 23.3.0' to TestAcrDialogs.Droid
Adding package 'Xamarin.Forms.2.2.0.31' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Forms.2.2.0.31' to folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Added package 'Xamarin.Forms.2.2.0.31' to 'packages.config'
Successfully installed 'Xamarin.Forms 2.2.0.31' to TestAcrDialogs.Droid
Removing package 'Xamarin.Android.Support.Design.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removed package 'Xamarin.Android.Support.Design.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removing package 'Xamarin.Android.Support.v4.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removed package 'Xamarin.Android.Support.v4.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removing package 'Xamarin.Android.Support.v7.AppCompat.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removed package 'Xamarin.Android.Support.v7.AppCompat.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removing package 'Xamarin.Android.Support.v7.CardView.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removed package 'Xamarin.Android.Support.v7.CardView.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removing package 'Xamarin.Android.Support.v7.MediaRouter.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'
Removed package 'Xamarin.Android.Support.v7.MediaRouter.23.0.1.3' from folder 'C:\Programming\C#\Cross-Platform Xamarin\New\TestAcrDialogs\packages'

And after that I get this error While Building Droid Project :

An outdated of 'Android SDK Build-tools' is in use which this version of Android Support Library does not support.  You must uninstall any 'Android SDK Build-tools' versions older than 23.0.0 from the 'Tools' section in your 'Android SDK Manager'      

But I do not have any old Build-Tools...

回答1:

I went to Build-tools under SDK Folder and I had the "android-6" folder and it contained Build-tools ver 23.0.3 But because of it's folder name, Xamarin takes that an old version.

I deleted it and Then all things went right...

So the folder name is important for Xamarin.



回答2:

You have to open Android SDK Manager and check which version of the tools you are using. If you use Visual studio, you can even open it from your IDE using a button at Android toolbar (View - Toolbars - Android). Once opened, you will be able to see which versions of Android build tools you have installed, and whether they match those required by the libraries you are using.