首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法初始化FFImageLoading,引发的异常

无法初始化FFImageLoading,引发的异常
EN

Stack Overflow用户
提问于 2017-11-05 20:50:21
回答 1查看 1.2K关注 0票数 0

我正在尝试在跨平台的xamarin应用程序中使用FFImageLoading。

我按照说明,在安卓和IOS项目中安装了Xamarin.FFImageLoading和Xamarin.FFImageLoading.Forms。

然后,我使用这段代码对库进行了简化:

代码语言:javascript
复制
[Activity (Label = "app", Icon = "@drawable/icon", Theme="@style/MainTheme", 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);

        CachedImageRenderer.Init();

        global::Xamarin.Forms.Forms.Init (this, bundle);
        global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, bundle);

        LoadApplication (new TheWillowEffect.App ());


    }
}

我还没试过呢。不是优先考虑。

为了查看它是否有效,我有以下XAML:

代码语言:javascript
复制
<ContentPage
....xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"....>

....

    <ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center"
        WidthRequest="300" HeightRequest="300"
        DownsampleToViewSize="true"
        Source = "http://loremflickr.com/600/600/nature?filename=simple.jpg"
        Grid.Column="1"
        Grid.Row="1">

当我运行它时,我得到:

代码语言:javascript
复制
System.MissingMethodException: method 'FFImageLoading.Forms.Droid.CachedImageRenderer.init()' not found.

不知道怎么回事。我怀疑intellisense会捕捉到缺少的using,并且在编译过程中没有错误,只有上面的一个错误,在运行时。

我做错什么了!?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-11-14 17:54:44

只需要清理工程和重建。

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

https://stackoverflow.com/questions/47126495

复制
相关文章

相似问题

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