由于“多进程",即时运行不起作用 [英] Instant run doesn't work due to "multiple process"

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

问题描述

配置即时运行后,运行按钮有一个黄色的小霹雳.安装,完整的消息列在图片中.

我在

解决方案

Instant Run 未为您的应用启用,因为它使用多个进程.

如 Android 工具项目网站所述(http://tools.android.com/recent/androidstudio20beta6availableinthecanarychannel):

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

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

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

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.

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.

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

"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."

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

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".

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

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