I've been using Android Studio 2.0 Beta 5 with Gradle plugin 2.0.0-beta5. I've had Instant Run feature enabled, which is very useful when I want to do a quick change-and-test. Because it usually needs 50 seconds for my project to do a complete :assembleDebug. With Instant Run, I've been able to get my changed code running on device within about 10 seconds.
However, when I need to remove the app from the test device and have a complete new install. Android Studio always do the following thing when I click the "Run" button for the next time:
:clean, :generateDebugSources, :generateDebugAndroidTestSources, :prepareDebugUnitTestDependencies, :mockableAndroidJar, :assembleDebug
This is very slow. It takes up about 2 minutes for my project.
Is there a way to disable this behaviour? Or why is it not possible?
The instant run, in order to be faster only target the API of the selected device.
Instant run ref.
But if you just need to push the apk again, you can use the gradle task install... (in general install+Flavor+Type i.e.:installProdRelease installPaidDebug) or use ADB to install your APK manually.