Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/215.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 Xamarin在发射时形成空白屏幕_Android_Xamarin_Xamarin.forms_Xamarin.android_Akavache - Fatal编程技术网

Android Xamarin在发射时形成空白屏幕

Android Xamarin在发射时形成空白屏幕,android,xamarin,xamarin.forms,xamarin.android,akavache,Android,Xamarin,Xamarin.forms,Xamarin.android,Akavache,我的移动应用程序使用Xamarin表单。在初始化我的应用程序时,我想加载我的配置 我把它保存在阿卡瓦什的缓存里 当有我的启动屏幕时,我在App.xaml中的onstart方法中启动此方法 它工作得很好,但当我调用Akavache缓存时,启动屏幕变为白色。我的代码运行良好,但屏幕上没有显示任何内容 如果我请求我的api而不是使用缓存来获取配置,这是相同的行为 我还尝试在我的主要活动android部分中移动GetConfig方法,但我有相同的行为 如果我取消这个电话,一切正常 您将在下面找到输出 我

我的移动应用程序使用Xamarin表单。在初始化我的应用程序时,我想加载我的配置

我把它保存在阿卡瓦什的缓存里

当有我的启动屏幕时,我在App.xaml中的onstart方法中启动此方法

它工作得很好,但当我调用Akavache缓存时,启动屏幕变为白色。我的代码运行良好,但屏幕上没有显示任何内容

如果我请求我的api而不是使用缓存来获取配置,这是相同的行为

我还尝试在我的主要活动android部分中移动GetConfig方法,但我有相同的行为

如果我取消这个电话,一切正常

您将在下面找到输出

我认为这与GetRenderableInternalFormatInfoEntry有关:不支持的可渲染内部格式37808

我怎样才能修好它

[0:] LogHost: Initializing Akavache
11-19 14:46:06.326 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.326 D/Mono    (26273): Searching for 'sqlite3_open_v2'.
11-19 14:46:06.333 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.333 D/Mono    (26273): Searching for 'sqlite3_busy_timeout'.
11-19 14:46:06.385 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.385 D/Mono    (26273): Searching for 'sqlite3_prepare_v2'.
11-19 14:46:06.398 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.398 D/Mono    (26273): Searching for 'sqlite3_step'.
11-19 14:46:06.402 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.402 D/Mono    (26273): Searching for 'sqlite3_column_type'.
11-19 14:46:06.408 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.408 D/Mono    (26273): Searching for 'sqlite3_column_int'.
11-19 14:46:06.412 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.412 D/Mono    (26273): Searching for 'sqlite3_finalize'.
11-19 14:46:06.417 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.418 D/Mono    (26273): Searching for 'sqlite3_changes'.
11-19 14:46:06.421 D/Mono    (26273): Requesting loading reference 6 (of 10) of 
11-19 14:46:06.422 D/Mono    (26273): Assembly Ref addref Akavache.Sqlite3[0xefcbab00] -> System.Core[0xefc9ff20]: 10
11-19 14:46:06.497 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.497 D/Mono    (26273): Searching for 'sqlite3_column_count'.
11-19 14:46:06.500 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.500 D/Mono    (26273): Searching for 'sqlite3_column_name'.
11-19 14:46:06.509 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.509 D/Mono    (26273): Searching for 'sqlite3_column_text'.
11-19 14:46:06.509 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.509 D/Mono    (26273): Searching for 'sqlite3_column_bytes'.
11-19 14:46:07.000 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:07.000 D/Mono    (26273): Searching for 'sqlite3_reset'.
11-19 14:46:07.035 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:07.035 D/Mono    (26273): Searching for 'sqlite3_errmsg'.
11-19 14:46:07.049 I/com.myapp(26273): Waiting for a blocking GC ProfileSaver
11-19 14:46:07.075 I/com.myapp(26273): WaitForGcToComplete blocked ProfileSaver on HeapTrim for 25.617ms
11-19 14:46:07.086 D/ViewRootImpl@3b6f7dc[MainActivity](26273): setView = com.android.internal.policy.DecorView@cbb66b6 TM=true MM=false
11-19 14:46:07.100 D/Mono    (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:07.100 D/Mono    (26273): Searching for 'sqlite3_bind_text'.
11-19 14:46:07.197 D/Mono    (26273): DllImport searching in: '__Internal' ('(null)').
11-19 14:46:07.197 D/Mono    (26273): Searching for 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-19 14:46:07.197 D/Mono    (26273): Probing 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-19 14:46:07.197 D/Mono    (26273): Found as 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-19 14:46:07.219 E/GraphicExt(26273): Can't load libboost_ext_fwk
11-19 14:46:07.219 E/GraphicExt(26273): GraphicExtModuleLoader::CreateGraphicExtInstance false
11-19 14:46:07.219 D/ViewRootImpl@3b6f7dc[MainActivity](26273): Relayout returned: old=(0,0,720,1520) new=(0,0,720,1520) req=(720,1520)0 dur=13 res=0x7 s={true 2995832832} ch=true
11-19 14:46:07.224 D/OpenGLRenderer(26273): createReliableSurface : 0xd3087f40(0xb290c800)
11-19 14:46:07.225 I/GPUD    (26273): @gpudInitialize: successfully initialized with 1, dbg=0 mmdump_dbg=0
11-19 14:46:07.244 D/OpenGLRenderer(26273): makeCurrent EglSurface : 0x0 -> 0x0
11-19 14:46:07.244 I/GPUD    (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.245 I/chatty  (26273): uid=10218(com.myapp) RenderThread identical 2 lines
11-19 14:46:07.245 I/GPUD    (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.248 D/Mono    (26273): Requesting loading reference 1 (of 2) of Java.Interop.dll
11-19 14:46:07.248 D/Mono    (26273): Loading reference 1 of Java.Interop.dll asmctx DEFAULT, looking for System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
11-19 14:46:07.248 D/Mono    (26273): Assembly Ref addref Java.Interop[0xbf22e9e0] -> System.Core[0xefc9ff20]: 11
11-19 14:46:07.257 I/GPUD    (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.269 I/chatty  (26273): uid=10218(com.myapp) RenderThread identical 4 lines
11-19 14:46:07.269 I/GPUD    (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37808
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37810
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37809
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37811
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37812
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37813
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37814
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37815
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37816
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37817
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37818
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37819
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37820
11-19 14:46:07.270 E/IMGSRV  (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37821
11-19 14:46:07.275 D/OpenGLRenderer(26273): makeCurrent EglSurface : 0x0 -> 0xdda1e200
11-19 14:46:07.279 W/Gralloc3(26273): mapper 3.x is not supported
11-19 14:46:07.283 E/ion     (26273): ioctl c0044901 failed with code -1: Invalid argument
11-19 14:46:07.288 I/GPUD    (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.295 I/GPUD    (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.311 D/ViewRootImpl@3b6f7dc[MainActivity](26273): MSG_WINDOW_FOCUS_CHANGED 1 1
11-19 14:46:07.312 D/InputMethodManager(26273): prepareNavigationBarInfo() DecorView@cbb66b6[MainActivity]
11-19 14:46:07.312 D/InputMethodManager(26273): getNavigationBarColor() -855310
11-19 14:46:07.317 D/InputMethodManager(26273): prepareNavigationBarInfo() DecorView@cbb66b6[MainActivity]
11-19 14:46:07.317 D/InputMethodManager(26273): getNavigationBarColor() -855310
11-19 14:46:07.317 V/InputMethodManager(26273): Starting input: tba=com.myapp ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
11-19 14:46:07.318 D/InputMethodManager(26273): startInputInner - Id : 0
11-19 14:46:07.318 I/InputMethodManager(26273): startInputInner - mService.startInputOrWindowGainedFocus
11-19 14:46:07.396 I/System.out(26273): (HTTPLog)-Static: isSBSettingEnabled false
11-19 14:46:07.396 I/System.out(26273): (HTTPLog)-Static: isSBSettingEnabled false
更新

如果我在方法DependencyResolver.Resolve().Initialize()之后添加调用,它会工作

方法初始化启动FirstContentPage

我的主要活动标题:我不使用splashscreen活动

[Activity(
    Label = "@string/app_name",
    Icon = "@drawable/icon",
    Theme = "@style/MyTheme.Splash",
    MainLauncher = true,
    ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.Locale | ConfigChanges.LayoutDirection, ScreenOrientation = ScreenOrientation.Portrait
    )
]
My app.xaml.cs OnStart

protected override async void OnStart()
    {

        base.OnStart();

        await UserConfigurationManager.GetAsync(); // Make splash screen blank and no more screens appear
        await DependencyResolver.Resolve<INavigationService>().Initialize();
        
        OnResume();
    }
protectedoverride async void OnStart()
{
base.OnStart();
等待UserConfigurationManager.GetAsync();//将启动屏幕设为空白,不再显示任何屏幕
等待DependencyResolver.Resolve().Initialize();
OnResume();
}
//UserConfigurationManager.GetAsync()的详细信息

if(IsUserLoggedIn)
{
尝试
{
confsaved=wait BlobCache.UserAccount.GetObject(“loggedconfig”);
}
抓住
{
}
}
其他的
{
尝试
{
confsaved=wait BlobCache.UserAccount.GetObject(“匿名配置”);
}
抓住
{
}
}

请发布相关代码谢谢Jason。我更新了codeHi,如果在应用程序启动完成后使用
按钮
单击事件加载数据,它在哪里工作?
if (IsUserLoggedIn)
        {
            try
            {
                confsaved = await BlobCache.UserAccount.GetObject<UserConfigurationDto>("loggedconfig");
            }
            catch
            {
            }

        }
        else
        {
            try
            {
                confsaved = await BlobCache.UserAccount.GetObject<UserConfigurationDto>("anonymousconfig");
            }
            catch
            {
            }
        }