Xamarin Android Mvvmcross заставки застрял - PullRequest
1 голос
/ 04 октября 2019

Мое приложение перестало работать после обновления MvvmCross с 6.3.1 до 6.4.0

Оно застряло на заставке.

// App.cs в основном проекте

public class App : MvxApplication
{
    public override void Initialize()
    {
        // this is not called
    }
}

// MainApplication .cs в проекте droid

[Application]
public class MainApplication : MvxAndroidApplication<Setup, AndroidApp>
{
    private string[] permissionsList;

    public MainApplication(IntPtr handle, JniHandleOwnership transer)
    : base(handle, transer)
    {       
     // this is called     
    }            
}

// Setup.cs в проекте droid

public class Setup : MvxAndroidSetup<AndroidApp>
{
    protected override IMvxAndroidViewPresenter CreateViewPresenter()
    {
        // this is called
        return new MvxAppCompatViewPresenter(AndroidViewAssemblies);
    }
    public override IEnumerable<Assembly> GetViewModelAssemblies()
    {
        return new[] { typeof(App).Assembly };
    }
    protected override void FillTargetFactories(IMvxTargetBindingFactoryRegistry registry)
    {
        MvxAppCompatSetupHelper.FillTargetFactories(registry);
        base.FillTargetFactories(registry);
    }
}

// SplashScreen.cs в проекте droid

[Activity(Label = "SplashScreen", MainLauncher = true, Theme = "@style/AppTheme.Splash", NoHistory = true, ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashScreen : MvxSplashScreenAppCompatActivity<MvxAppCompatSetup<App>, App>
{       
     public SplashScreen() : base(Resource.Layout.SplashScreen)
     {
         // this is called
     }
}

РЕДАКТИРОВАТЬ: я проследил исключение, которое, я думаю, нарушает процесс инициализации:

Не удалось разрешить тип с токеном 01000015 из typeref (ожидаемый класс 'System.Drawing.Color' всборка 'System.Drawing.Common, версия = 4.0.0.0, культура = нейтральная, PublicKeyToken = cc7b13ffcd2ddd51')

в

в (обертка, управляемая в нативный) System.Reflection.Assembly.GetTypes (System.Reflection.Assembly, bool)
в System.Reflection.Assembly.GetTypes () [0x00000] в: 0 в MvvmCross.Core.MvxSetup + <> c.b__55_0 (система. Сборка Reflection.Assembly [0x00000] в D: \ a \ 1 \ s \ MvvmCross \ Core \ MvxSetup.cs: 392 в System.Linq.Enumerable +SelectManySingleSelectorIterator 2[TSource,TResult].MoveNext () [0x00051] in <715c2ff6913942e6aa8535593b3ef35a>:0 at System.Linq.Enumerable+WhereEnumerableIterator 1 [TSource] .MoveNext () [0x0004e] в <715c2ff6913942e6aa8535593b3ef35a>: 0 в MvvmCross.Core.MvxSetup.LoadPlugins (Mvvm ​​\ zanager_player_player_player_player_playserx)MvvmCross \ Core \ MvxSetup.cs: 395 в MvvmCross.Core.MvxSetup.InitializePluginFramework () [0x00007] в D: \ a \ 1 \ s \ MvvmCross \ Core \ MvxSetup.cs: 345 в Mvvm. ) [0x00065] в D: \ a \ 1 \ s \ MvvmCross \ Core \ MvxSetup.cs: 108 в Eloptio.Mobile.Droid.Setup.InitializeSecondary () [0x00002] в C: \ Projects \ el \ trunk \ Mobile \src \ Eloptio.Mobile \ Droid \ Setup.cs: 30

...