首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >syncfusion Xamarin错误

syncfusion Xamarin错误
EN

Stack Overflow用户
提问于 2017-09-30 18:49:32
回答 2查看 541关注 0票数 0

在主活动页上获取此错误...System.TypeLoadException:在对自定义属性进行解码时无法加载类型Syncfusion.RangeNavigator.XForms.Droid.RangeNavigatorEventDependencyService:(System.TypeLoadException)

只是试图实现一个sfchart,甚至还没有开始,已经得到了一个错误。

下面是我的主要活动代码

代码语言:javascript
复制
using System;


using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Syncfusion.SfChart.XForms.Droid;

namespace Drip.Droid
{
    [Activity(Label = "Drip.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
    {
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            new SfChartRenderer();

            LoadApplication(new App());
        }
    }
}

下面是我的xaml代码

代码语言:javascript
复制
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Drip.MyPage" xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms">
    <ContentPage.Content>
   <chart:SfChart x:Name="Chart">

    <chart:SfChart.PrimaryAxis>
  <chart:CategoryAxis LabelRotationAngle= "-45">
    <chart:CategoryAxis.Title>
      <chart:ChartAxisTitle Text="Meetup Date"/>
    </chart:CategoryAxis.Title>
  </chart:CategoryAxis>
</chart:SfChart.PrimaryAxis>

    <chart:SfChart.SecondaryAxis>
  <chart:NumericalAxis>
    <chart:NumericalAxis.Title>
      <chart:ChartAxisTitle Text="Count"/>
    </chart:NumericalAxis.Title>
  </chart:NumericalAxis>
</chart:SfChart.SecondaryAxis>
</chart:SfChart>
    </ContentPage.Content>
</ContentPage>
EN

回答 2

Stack Overflow用户

发布于 2017-09-30 20:30:13

看起来您使用的是图表控件的xamarin窗体版本。确保在android项目中添加对以下dll的引用

Syncfusion.SfChart.XForms.Android.dll

Syncfusion.SfChart.XForms.dll

https://help.syncfusion.com/xamarin/introduction/control-dependencies#sfchart

票数 0
EN

Stack Overflow用户

发布于 2017-10-04 17:57:44

我们恳请您重新构建并运行您的应用程序来解决此问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46501993

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档