Заставить Tizen.TV.UIControls работать на Visual Studio - PullRequest
1 голос
/ 19 марта 2020

Я разрабатываю галерею с изображениями с веб-сервера, который я размещаю. Дело в том, что я хочу перемещаться между изображениями с помощью контроллера телевизора (пульта дистанционного управления). Я попробовал образец Tizen, предоставленный на GitHub:

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

Есть идеи, как заставить это работать?

1 Ответ

1 голос
/ 23 марта 2020

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 версия

...