命名空间'Xamarin.Forms.Platform'中不存在类型或命名空间名称'Android' [英] The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform'
问题描述
大家好。
我几天前将我的nuget软件包更新为新版本。
但我的Android项目在MainActivity.cs中有2个错误:
$
1:
命名空间中不存在类型或命名空间名称"Android" Xamarin.Forms.Platform'(你错过了一个程序集引用吗?)Sama.SamaApp.Android MainActivity.cs
Hi guys.
I Updated my nuget packages few days ago to new versions.
but my Android project has 2 errors in MainActivity.cs:
1:
The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?) Sama.SamaApp.Android MainActivity.cs
2:
'MainActivity.OnCreate(Bundle)':找不到合适的方法来覆盖MainActivity.cs
2:
'MainActivity.OnCreate(Bundle)': no suitable method found to override MainActivity.cs
我在谷歌搜索它并找到解决方案。
i search it in google and find solutions.
但我测试了两个上行链路中的所有解决方案,但没有为我工作。
$
i测试清除nuget和dotnet缓存。删除bin& obj文件夹。恢复nuget包。删除并重新安装Xamarin.Forms。最后清理重建解决方案。
但我无法修复它。
谢谢...
But i tested all solutions in two up links but not worked for me.
i tested clear nuget and dotnet caches . removing bin & obj folders . restore nuget packages . remove and reinstall Xamarin.Forms .finally clean rebuilding the solution.
But I could not fix it.
thanks...
推荐答案
编译错误显示编译错误显示的代码。错误消息表示您的代码引用了命名空间中的对象,但是该项目没有引用具有命名空间的DLL。
You have a compile error show the code where the compile error is showing. The error message means your code has a reference to an object in the namespace, but the project has no reference to a DLL that has the namespace.
这篇关于命名空间'Xamarin.Forms.Platform'中不存在类型或命名空间名称'Android'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!