如何解决如何修复在更新到Visual Studio 2019版本16.7.0之后出现的错误
我有一个使用Xamarin.Forms构建的移动应用
将Visual Studio从 16.4.4 更新到 16.7.0
之后这些错误出现了
Assembly 'Xamarin.GooglePlayServices.Maps' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.CardView' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.GooglePlayServices.Base' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.MediaRouter' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.Vector.Drawable' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.Design' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.GooglePlayServices.Gcm' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.AppCompat' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.RecyclerView' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.GooglePlayServices.Basement' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.Animated.Vector.Drawable' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.AppCompat' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.GooglePlayServices.Maps' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.CardView' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.GooglePlayServices.Gcm' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.RecyclerView' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.Design' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.MediaRouter' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.Animated.Vector.Drawable' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.Vector.Drawable' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.GooglePlayServices.Base' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v7.MediaRouter' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
Assembly 'Xamarin.GooglePlayServices.Basement' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]',which is no longer supported. Use a newer version of this NuGet package or notify the library author. MyApp.Android
我尝试了什么?
1-我试图删除 bin 和 obj 文件夹,以强制项目重建所有内容,但错误仍然出现
2-我试图降级到 16.4.4 ,并且错误消失了,但是我不想通过以下方式修复它之所以这样,是因为我想使用此new feature in 16.7.0
创建一个新的其他应用程序因此,是否有办法在不降级到旧版本的情况下摆脱这些错误?
注释:
Xamarin.Forms的版本为2.3
解决方法
Xamarin.Forms的版本为2.3
由于Visual Studio 2019不支持v2.3,因此您需要更新Xamarin.Forms的较新版本; Xamarin.Forms v2.3是released in 2016。
我建议使用最新版本的Xamarin.Forms。
,android版本10不支持Xamarin.Android.Support.v7 如果将目标框架版本更改为Android 9,则可以在设备中进行调试。
按照步骤
转到Android.project > properties > target framework
您能否尝试将android Target Framework(从项目属性或.csproj)升级到最新版本,如下所示:
在删除bin和obj文件夹后重建项目。应该可以。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。