即时运行不起作用

即时运行不起作用

本文介绍了由于“多次处理",即时运行不起作用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

配置即时运行后,运行"按钮上有一个小的黄色雷电.但是,当我运行该应用程序时,Android Studio仍会执行完整的构建和安装后,图片中列出了完整的消息.

After having configured instant run, the run button has a small yellow thunderbolt.But while I run the app, Android Studio still performed a full build & install, full message is listed in the picture.

我已经在 http://tools.android.com/中搜索了官方文档tech-docs/instant-run ,但是"multiple process"一事无成.我想知道"multiple process"是指编译还是我的android应用.

I've searched the official documents in http://tools.android.com/tech-docs/instant-run , but there wasn't anything about "multiple process".I wonder "multiple processes" means compiling or my android app.

我应该配置什么以关闭多个进程并体验即时运行?

What should I configure to turn off multiple processes and experience instant run ?

推荐答案

您的应用未启用即时运行,因为它正在使用多个进程.

Instant Run is not enabled for your app because it is using multiple processes.

如Android Tools Project网站上所述( http://tools.android.com/recent/androidstudio20beta6availableinthecanarychannel ):

As stated on the Android Tools Project Site (http://tools.android.com/recent/androidstudio20beta6availableinthecanarychannel):

使用Instant Run无法正确更新使用多个进程(通过清单中的android:process)的应用程序.目前,在这种情况下,我们已关闭Instant Run."

"Apps that were using multiple processes (via android:process in the manifest) were not being updated properly with Instant Run. For the time being, we have turned off Instant Run in such a scenario."

因此,要体验即时运行,必须确保您的应用程序没有使用多个进程.检查您的AndroidManifest.xml.

Hence, to experience instant run, you must ensure your app isn't using multiple processes. Check your AndroidManifest.xml for this.

可能多个进程的使用来自导入的库.例如,LeakCanary使用在其自己的AndroidManifest.xml中定义的多个进程.查找定义的最佳方法是在整个项目(OS X上为Android Studio的Cmd-Shift-F)中搜索"android:process".

It may be that the multiple process usage comes from an imported library. LeakCanary, for example, uses multiple processes, defined in its own AndroidManifest.xml. The best way to find where this is defined is to search your entire project (Cmd-Shift-F in Android Studio on OS X) for "android:process".

这篇关于由于“多次处理",即时运行不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 20:42