gradle 2.1.0中的问题:应用程序以5-6秒的延迟启动 [英] Issue in gradle 2.1.0 : Application launches with delay of 5-6 seconds

查看:90
本文介绍了gradle 2.1.0中的问题:应用程序以5-6秒的延迟启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以在gradle 1.5.0上正常运行的应用程序.应用程序用于在构建gradle之后立即启动.

I have an application which was working fine with gradle 1.5.0. Application use to launch instantly after gradle build.

但是当我将gradle更改为gradle 2.1.0时,它在gradle构建之后第一次以5-6秒的延迟启动.我还在这些应用程序中测试了其他一些应用程序,但同样的问题仍然存在.

But when I changed the gradle to gradle 2.1.0 it launches with a delay of 5-6 seconds for first time after gradle build. I have tested with some of my other apps also in those apps also same issue persists.

然后我将gradle版本改回了gradle 1.5.0,然后我的应用再次正常运行,没有任何延迟.

Then I changed the gradle version back to gradle 1.5.0 then again my app started working fine without any delay.

因此,gradle 2.1.0似乎有问题.

So, it seems like there is an issue with gradle 2.1.0.

此外,我注意到另一件事,当我使用gradle 2.1.0运行该应用程序时,该应用程序的高速缓存在首次启动后会显示11-12 MB左右,而无需在应用程序中执行注册或任何其他操作

Moreover, I noticed one more thing that when I run the app with gradle 2.1.0 then the cache memory of app shows around 11-12 MB after first time launch without performing registration or any other action in app

在使用gradle 1.5.0运行时,高速缓存的内存大小仍约为15-17KB.

While on running with gradle 1.5.0 cache memory size remains around 15-17KB.

推荐答案

由于您禁用了即时运行功能,因此首次启动延迟消失后,由于即时运行功能,新的Android Studio版本中出现了此问题.

This issue came in new android studio version due to instant run feature when you disable instant run feature first time launch delay will be gone.

这篇关于gradle 2.1.0中的问题:应用程序以5-6秒的延迟启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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