【问题标题】:Making Tizen.TV.UIControls work on Visual Studio使 Tizen.TV.UIControls 在 Visual Studio 上工作
【发布时间】:2020-03-23 10:44:04
【问题描述】:

我正在开发一个画廊,其中包含来自我托管的网络服务器的图像。问题是我想使用电视控制器(遥控器)在图像之间导航。我尝试了 GitHub 上提供的 Tizen 示例:

https://github.com/Samsung/Tizen.TV.UIControls/wiki/Introducing-Tizen.TV.UIControls https://github.com/Samsung/Tizen.TV.UIControls

但我不能让它们工作。每次我尝试实现它时,我都会收到此错误:

System.TypeLoadException: Could not load type 'Xamarin.Forms.Platform.Tizen.ExportRendererAttribute' from assembly 'Xamarin.Forms.Platform.Tizen, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)
   at Xamarin.Forms.Internals.Registrar.RegisterAll(Type[] attrTypes, InitializationFlags flags)
   at Xamarin.Forms.Forms.SetupInit(CoreApplication application, Nullable`1 maybeOptions)
   at Xamarin.Forms.Forms.Init(CoreApplication application, Boolean useDeviceIndependentPixel)
   at Xamarin.Forms.Forms.Init(CoreApplication application)
   at Gallery.Program.Main(String[] args) in C:\Users\Mow\Source\Repos\ceffDptInfo\tizen_gallery\Gallery.Tizen.TV\Gallery.Tizen.TV.cs:line 18

知道如何让它工作吗?

【问题讨论】:

标签: c# xamarin tizen


【解决方案1】:

API 在 Xamarin.forms 4.2.0 上被破坏 https://docs.microsoft.com/en-us/xamarin/xamarin-forms/release-notes/4.2/4.2.0-api#removed-type-xamarinformsplatformtizenexportrendererattribute

在发布新版 Tizen.TV.UIControls 之前,只能在 Xamarin.forms 4.1.x 版本下使用

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-07-16
    • 1970-01-01
    • 1970-01-01
    • 2011-02-20
    • 2013-05-15
    • 1970-01-01
    • 2011-06-17
    • 2016-09-18
    相关资源
    最近更新 更多