Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/222.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Mdpi平板电脑启动错误:黑屏显示_Android_Xamarin_Xamarin.android_Mvvmcross - Fatal编程技术网

Android Mdpi平板电脑启动错误:黑屏显示

Android Mdpi平板电脑启动错误:黑屏显示,android,xamarin,xamarin.android,mvvmcross,Android,Xamarin,Xamarin.android,Mvvmcross,嘿,我正在研究Xamarin和Mvvmcross,我的问题是,当我在(三星Galaxy Tab 3)Mdpi设备上启动应用程序时,它会显示黑屏,什么也没有发生, 这是我的密码 Splash.cs namespace Mobile.UI.Droid { [Activity( Label = "Mobile Tasks" , MainLauncher = true , Icon = "@drawable/icon" ,Theme

嘿,我正在研究Xamarin和Mvvmcross,我的问题是,当我在(三星Galaxy Tab 3)Mdpi设备上启动应用程序时,它会显示黑屏,什么也没有发生, 这是我的密码

Splash.cs

namespace Mobile.UI.Droid
{
    [Activity(
        Label = "Mobile Tasks"
        , MainLauncher = true
        , Icon = "@drawable/icon"
        ,Theme = "@style/MyActionBarSplash"
        , NoHistory = true)]

    public class SplashScreen : MvxSplashScreenActivity
    {
        public SplashScreen()
            : base(Resource.Layout.SplashScreen)
        {
        }
    }
}
setup.cs

public class Setup : MvxAndroidSetup
{
    Context _context;
    public Setup(Context applicationContext) : base(applicationContext)
    {
        _context = applicationContext;
        CurrentPlatform.Init();

        Insights.Initialize(XamarinInsightsConstants.APIKey, applicationContext);
    }
    protected override IMvxAndroidViewPresenter CreateViewPresenter()
    {
        var presenter = new CustomDroidViewPresenter();
        Mvx.RegisterSingleton(presenter);
        return presenter;
    }
    protected override IMvxApplication CreateApp()
    {
        return new Core.App();
    }

    protected override System.Collections.Generic.IList<string> ViewNamespaces
    {
        get
        {
            var toReturn = base.ViewNamespaces;
            toReturn.Add("MOBILE.Mobile.UI.Droid.Controls");
            toReturn.Add("MOBILE.Mobile.UI.Droid.Utilities");
            return toReturn;
        }
    }
    protected override IMvxTrace CreateDebugTrace()
    {
        return new DebugTrace();
    }

    protected override void InitializeLastChance()
    {            
        var errorHandler = new ErrorDisplayer(ApplicationContext);
        //Cirrious.MvvmCross.Plugins.Color.PluginLoader.Instance.EnsureLoaded();
        base.InitializeLastChance();
        Mvx.RegisterSingleton<IDeviceDetails>(new CustomDroidDetails());
        //Mvx.RegisterSingleton<ILogger>(new DroidLogger());
        Mvx.RegisterSingleton<IVersionDetail>(new VersionDetail());
    }

    protected override void FillTargetFactories(IMvxTargetBindingFactoryRegistry registry)
    {
        base.FillTargetFactories(registry);
        registry.RegisterFactory(new MvxCustomBindingFactory<LinearLayout>("ShapeBackground", (view) => new ShapeBackgroundBinding(view)));
        registry.RegisterFactory(new MvxCustomBindingFactory<TextView>("CustomText", (view) => new CustomTextBinding(view)));
    }
}
CustomDroidDetails

 public class CustomDroidDetails : IDeviceDetails
{
    public Platform Platform
    {
        get { return Platform.Droid; }
    }
    public DeviceType DeviceType
    {
        get { return DeviceType.Phone; }
    }

}
logcat

在这种情况下,
app.config
不起作用。你能添加你的自定义演示者吗?谢谢Maetijn,现在检查我的问题我看你的问题没有更新。
 public class CustomDroidDetails : IDeviceDetails
{
    public Platform Platform
    {
        get { return Platform.Droid; }
    }
    public DeviceType DeviceType
    {
        get { return DeviceType.Phone; }
    }

}