Max
Max

Reputation: 466

Android studio rebuilds project after changing device (plugging new one)

Scenario looks like this:

  1. I build project and launch it on device
  2. I change device (unplug old one and plug new one to my usb)
  3. I run project and pick new device as deployment target.
  4. Android studio rebuilds project again

Is there any way to fix this? I mean use already built .apk file and install it immediately on newly plugged device?

Upvotes: 0

Views: 52

Answers (1)

Kshitij Aggarwal
Kshitij Aggarwal

Reputation: 5287

This is because of the Instant Run feature introduced in Android 2.0. Because Instant Run has to convert your complete project into small and numerous dex files which are then transferred on the device/emulator and then build in place, every time you unplug and replug the device, Android Studio has to go through the whole process again.

Way around is this if you change devices frequently is to turn off Instant Run.

Upvotes: 0

Related Questions