当我创建一个Xamarin项目并构建Droid时,它很不错...... 但是当我使用控制台添加任何nuget包时,例如:
Install-Package Acr.UserDialogs 或者安装包Rg.Plugins.Popup 它告诉我这个在控制台上:
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'
之后我在构建Droid项目时遇到此错误:
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'
但我没有任何旧的Build-Tools ......
答案 0 :(得分:1)
我去了SDK文件夹下的Build-tools,我有“android-6”文件夹,它包含Build-tools ver 23.0.3但是由于它的文件夹名称,Xamarin认为它是旧版本。
我删除了它,然后一切顺利......
因此,文件夹名称对于Xamarin非常重要。
答案 1 :(得分:0)