我最近开始在笔记本电脑上创建我的第一个xamarin项目,它可以正常运行并且没有错误。当我尝试在桌面上运行同一项目时,通过代码的某些部分我会收到6条错误消息和错误消息。
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Forms' does not exist in the namespace 'Xamarin' (are you missing an assembly reference?) MealMateApp.Android J:\MealMateApp\MealMateApp\MealMateApp.Android\MainActivity.cs 15 Active
Error CS0115 'MainActivity.OnCreate(Bundle)': no suitable method found to override MealMateApp.Android J:\MealMateApp\MealMateApp\MealMateApp.Android\MainActivity.cs 17 Active
Error CS0103 The name 'TabLayoutResource' does not exist in the current context MealMateApp.Android J:\MealMateApp\MealMateApp\MealMateApp.Android\MainActivity.cs 19 Active
Error CS0103 The name 'ToolbarResource' does not exist in the current context MealMateApp.Android J:\MealMateApp\MealMateApp\MealMateApp.Android\MainActivity.cs 20 Active
Error CS0234 The type or namespace name 'Forms' does not exist in the namespace 'Xamarin' (are you missing an assembly reference?) MealMateApp.Android J:\MealMateApp\MealMateApp\MealMateApp.Android\MainActivity.cs 23 Active
Error CS0103 The name 'LoadApplication' does not exist in the current context MealMateApp.Android J:\MealMateApp\MealMateApp\MealMateApp.Android\MainActivity.cs 32 Active
我也收到了这些警告。
Severity Code Description Project File Line Suppression State
Warning NU1608 Detected package version outside of dependency constraint: Xamarin.Android.Support.CustomTabs 23.3.0 requires Xamarin.Android.Support.v4 (= 23.3.0) but version Xamarin.Android.Support.v4 27.0.2.1 was resolved. MealMateApp.Android J:\MealMateApp\MealMateApp\MealMateApp.Android\MealMateApp.Android.csproj 1
Warning MSB3106 Assembly strong name "C:\Users\Jay\.nuget\packages\xamarin.forms\3.1.0.697729\lib\netstandard2.0\Xamarin.Forms.Core.dll" is either a path which could not be found or it is a full assembly name which is badly formed. If it is a full assembly name it may contain characters that need to be escaped with backslash(\). Those characters are Equals(=), Comma(,), Quote("), Apostrophe('), Backslash(\). MealMateApp C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2110
Warning MSB3106 Assembly strong name "C:\Users\Jay\.nuget\packages\xamarin.forms\3.1.0.697729\lib\netstandard2.0\Xamarin.Forms.Platform.dll" is either a path which could not be found or it is a full assembly name which is badly formed. If it is a full assembly name it may contain characters that need to be escaped with backslash(\). Those characters are Equals(=), Comma(,), Quote("), Apostrophe('), Backslash(\). MealMateApp C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2110
Warning MSB3106 Assembly strong name "C:\Users\Jay\.nuget\packages\xamarin.forms\3.1.0.697729\lib\netstandard2.0\Xamarin.Forms.Xaml.dll" is either a path which could not be found or it is a full assembly name which is badly formed. If it is a full assembly name it may contain characters that need to be escaped with backslash(\). Those characters are Equals(=), Comma(,), Quote("), Apostrophe('), Backslash(\). MealMateApp C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2110
有任何修复建议吗?