2017-11-05 7 views
0

플랫폼 간 xamarin 앱에서 FFImageLoading을 사용하려고합니다.FFImageLoading을 초기화 할 수 없습니다. 예외 발생

나는 지침에 따라 안드로이드 및 IOS 프로젝트에 Xamarin.FFImageLoading 및 Xamarin.FFImageLoading.Forms를 설치했습니다.

나는 그 라이브러리를 intitialize이 코드를 사용

[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()); 


    } 
} 

나는 시도하지 않은 아직 IOS에. 우선 순위가 아닙니다.

나는 그것이 작동하는 경우 다음과 같은 XAML 그냥 볼 수 있습니다 : 나는 그것을 실행하면

<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"> 

, 내가 얻을 :

System.MissingMethodException: method 'FFImageLoading.Forms.Droid.CachedImageRenderer.init()' not found. 

무슨 일이 일어나고 있는지 확실하지. 나는 intellisense가 missing using을 잡았을 것으로 의심하고 있으며, 컴파일 중에는 위의 오류 만 런타임에 발생합니다.

내가 잘못 했나요!?

+0

해결 방법을 시도해 보셨습니까? xamarin.Android에 올바른 "using"을 추가 했습니까? –

+0

@AlessandroCaliaro 와우 .... 그냥 청소했다 .... 고마워! –

답변

0

방금 ​​프로젝트를 정리하고 다시 작성해야했습니다.