androidandroid-studioinstant-run

Instant run doesn't work due to "multiple 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 ?


Solution

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