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が逃したusing
を捕まえたと思われ、コンパイル時にエラーがなく、実行時には上記のエラーだけがあります。
どうしたのですか?
解決方法を試しましたか? xamarin.Androidに正しい「using」を追加していますか? –
@AlessandroCaliaroうわー....ちょうどきれいにしていた....ありがとう! –