我正在尝试编译我的 Xamarin Form
解决方案的 Android
项目,但失败并出现以下异常:
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' You also need to install 'Android SDK Build-tools' version 23.0.0 or higher. Invoice.Android
这发生在我更新了一些使用 Telerik
和 SyncFusion
的组件之后。
我已经在 here 尝试了所有建议的解决方案,包括清洁解决方案和更新构建工具
,但都没有任何好处。
我正在使用 Android SDK Manager 24.4.1
和 build-tools 23.0.3
,它们显然是最新版本。
我附上了所有已安装组件的图片,如果您需要更多信息,请告诉我。
这是我的packages.config
:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid44" />
<package id="Xamarin.Forms" version="2.3.0.49" targetFramework="monoandroid44" />
</packages>
这是完整的构建输出
:
Restoring NuGet packages... To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.' 1>------ Rebuild All started: Project: Invoice, Configuration: Debug Any CPU ------ 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\InfoView.xaml.cs(28,17,28,38): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(57,13,57,34): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(68,21,68,41): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(68,44,68,68): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(68,71,68,98): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(69,25,69,56): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(121,17,121,31): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(127,17,127,33): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\Views\ItemView.xaml.cs(131,17,131,35): warning CS0618: 'Label.Font' is obsolete: 'Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0' 1> Invoice -> C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice\bin\Debug\XamarinIOInvoice.dll 2>------ Rebuild All started: Project: Invoice.Android, Configuration: Debug Any CPU ------ 2>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\Invoice.Android\Properties\AndroidManifest.xml : warning XA0101: @(Content) build action is not supported 2>C:\Users{}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets(40,5): error : 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' 2>C:\Users{user}\AppData\Local\Syncfusion\EssentialStudio\14.2.0.26\Xamarin\sample\Forms\Invoice\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets(40,5): error : You also need to install 'Android SDK Build-tools' version 23.0.0 or higher. ========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
更新
我刚刚更新到 build-tools 24.0.1
,但错误并没有消失!
这个问题只存在于Xamarin Form
,我可以编译Android
项目。
最佳答案
转到您的 SDK Build-Tools 文件夹并将文件夹重命名为 23.0.3
我这里也有这个问题:An outdated of 'Android SDK Build-tools' Error on Xamarin
关于android - 无法构建 Xamarin Android 项目 : An outdated of 'Android SDK Build-tools' is in use,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38800721/