将Visual Studio 2017更新为版本15.5.2后,Xamarin错误



将我的VS 2017更新为最新版本后,当我创建一个新的Xamarin应用程序时,它会加载错误。令人惊讶的一点是,当我在更新IDE之前打开一个创建的应用程序时,它会完美加载。谁能帮忙?以下是错误:

Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0012  The type 'AppCompatActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Error   CS0103  The name 'InitializeComponent' does not exist in the current context    App2ButtonImages.iOS    D:Kajambiya2017XamarinApp2ButtonImagesApp2ButtonImagesApp2ButtonImagesApp.xaml.cs    14  Active.
Error   NU1202  Package Xamarin.Android.Support.v7.MediaRouter 25.4.0.2 is not compatible with monoandroid60 (MonoAndroid,Version=v6.0). Package Xamarin.Android.Support.v7.MediaRouter 25.4.0.2 supports: monoandroid70 (MonoAndroid,Version=v7.0)
Error   NU1202  Package Xamarin.Android.Support.v7.CardView 25.4.0.2 is not compatible with monoandroid60 (MonoAndroid,Version=v6.0). Package Xamarin.Android.Support.v7.CardView 25.4.0.2 supports: monoandroid70 (MonoAndroid,Version=v7.0)               
Error   NU1202  Package Xamarin.Android.Support.v7.AppCompat 25.4.0.2 is not compatible with monoandroid60 (MonoAndroid,Version=v6.0). Package Xamarin.Android.Support.v7.AppCompat 25.4.0.2 supports: monoandroid70 (MonoAndroid,Version=v7.0) 
Error   NU1202  Package Xamarin.Android.Support.v4 25.4.0.2 is not compatible with monoandroid60 (MonoAndroid,Version=v6.0). Package Xamarin.Android.Support.v4 25.4.0.2 supports: monoandroid70 (MonoAndroid,Version=v7.0)
Error   NU1202  Package Xamarin.Android.Support.Design 25.4.0.2 is not compatible with monoandroid60 (MonoAndroid,Version=v6.0). Package Xamarin.Android.Support.Design 25.4.0.2 supports: monoandroid70 (MonoAndroid,Version=v7.0)

我认为至少第一个错误是自我说明的,您需要添加Nuget软件包

xamarin.android.support.v7.appcompat

其他错误指向需要针对较新的Android SDK构建,您可能没有安装。

我从Nuget卸载了所有AppCompatactivity软件包,它与我一起使用

最新更新