安卓系统中启动时显示白屏的时间过长[英] Lauch screen showing white screen in android for too long at start up

本文是小编为大家收集整理的关于安卓系统中启动时显示白屏的时间过长的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我的问题是,每次我曾经第一次启动我的应用程序.它为至少40秒显示了一个白色屏幕,这显然太长而不是在Android Studio中了解APK分析仪.所以我用它,我看到libs文件夹占总大小的93%,所以我试图删除所有非使用的库并检查.尺寸为74%的应用程序,我也看到了20秒的推出时间减少,但22秒仍然很多.我不知道如何解决这个问题.即使我显示Splash屏幕22秒等待仍然很多. 对不起,我在其他笔记本电脑上,所以我无法展示任何东西,我只是在启动时显示2个按钮,所以开始屏幕不能成为一个问题.有人可以帮我解决这个问题或至少将启动时间带到10秒以下.谢谢:)

推荐答案

转到文件 - >设置 - >构建,执行,部署 - >即时运行

取消选中启用即时运行如果检查,然后运行项目并让我知道.

其他推荐答案

只是提到透明主题到androidmanifest.xml文件中的起始活动. 喜欢:

<activity
        android:name="first Activity Name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" >
 <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
 </activity>

其他推荐答案

我面临相同的问题尝试禁用即时运行.进入

可以访问该设置

文件>设置>构建,执行,部署>即时运行

取消选中复选框,然后重新构建项目

本文地址:https://www.itbaoku.cn/post/1937914.html

问题描述

My problem is that every time i used to launch my app for the very first time. It showed a white screen for at-least 40 secs which was obviously too long than i learned about APK Analyzer in android studio. So i used it and i saw that libs folder was taking 93% of total size so i tried to remove all non used libraries and checked . The size became 74% of total app and i also saw a decrease of 20 secs in launch time but 22 secs is still a lot. I don't know how to solve this. Even if i show splash screen 22 secs wait is still a lot. Sorry i am on other laptop so i can't show anything and i am just showing 2 buttons on startup so start screen can't be an issue. Can some one please help me solve this or atleast bring startup time to below 10 secs. Thank you :)

推荐答案

Go to File -> Setting -> Build,Execution, Deployment-> Instant Run

uncheck the Enable instant run if it is checked, then run the project and let me know.

其他推荐答案

Just mention the transparent theme to the starting activity in the AndroidManifest.xml file. Like:

<activity
        android:name="first Activity Name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" >
 <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
 </activity>

其他推荐答案

I faced same problem try disabling instant run. The setting can be accessed by going into

File > Setting > Build, Execution, Deployment > Instant Run

Uncheck the Checkbox, then re-build the project