Android应用在5.0+设备上的延迟时间 [英] Android app time delay on 5.0+ devices

查看:103
本文介绍了Android应用在5.0+设备上的延迟时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在5.0+设备,4.4或更低版本的设备上首次加载时,我的应用需要10-12秒的延迟,但没有此问题。
我在Application类的onCreate方法中添加了一条日志消息,但在10到12秒后也会调用它。
我尝试过multidex enable false,minify enabled true,但没有任何区别。
我发现一件事,当我们从应用程序信息活动中清除缓存和数据时,加载时又再次延迟,我的应用程序占用了大约10mb的缓存和5mb的数据,这比平时要高。
如何解决这个问题?我在网络上或堆栈溢出中都找不到这种类型的问题

My app is taking 10-12 sec delay while first load on 5.0+ devices, 4.4 or below devices does not have this problem. I have added a log message in Application class onCreate method but it is also called after 10-12 sec seconds. I have tried multidex enable false, minify enabled true but does not make any difference. I have found one thing, when we clear cache and data from app info activity, then it again delay while loading and my app is taking around 10mb of cache and 5 mb of data which is higher than usual. How to address this problem? I have not find this type of issue on net or stackoverflow

推荐答案

在Android Studio中启用即时运行时会发生。尝试禁用即时运行并检查。
仅在调试版本中发生

It happens when you enable Instant Run in Android Studio. Try disabling instant run and check. It happens only in debug builds

这篇关于Android应用在5.0+设备上的延迟时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆