我正在使用 Xamarin Android。 没有对我的项目做任何更改,我收到此错误:
UNHANDLED EXCEPTION:
07-18 01:29:39.812 I/MonoDroid( 1901): System.TypeLoadException: Could not load type 'Android.OS.BaseBundle' from assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'.
07-18 01:29:39.812 I/MonoDroid( 1901): at Android.Support.V4.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (intptr,intptr,intptr,intptr,intptr) <0x0009b>
07-18 01:29:39.812 I/MonoDroid( 1901): at (wrapper dynamic-method) object.92b95183-96c6-4c05-8b2f-e6402eece616 (intptr,intptr,intptr,intptr,intptr) <0x0003b>
最佳答案
这个问题很愚蠢。
在我的 visual studio 解决方案中,我有多个 android 项目。 每个项目都设置为针对 android 4.4 进行编译。 重建后,Xamarin 工具决定将一些项目的版本更改为 android 5.0。
为什么?因为 Xamarin。这就是为什么。
将版本恢复到 android 4.4 后一切正常!
我找到了吗? 偶然。我看到一些文件被修改了(有一个红色的 SVN 点)。
我希望这能为您节省数小时甚至数天的“令人兴奋和有趣的工作”:)
关于android - 无法加载类型 'Android.OS.BaseBundle",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31488166/