I am trying to get Instant Run to work in Android Studio. I have A.S. 2.0 Preview 4 installed, and my Instant Run is enabled like this:
Now, I am experimenting with this in the Topeka sample app from Google (https://github.com/googlesamples/android-topeka). So, I am placing a bunch of Toasts in CategorySelectionActivity and CategorySelectionFragment, hoping that they can be instantaneously changed with Instant Run. But every time I hit the Instant Run button in A.S., it completely shuts down the app and re-installs it. It does not resume from the same activity I was on previously (as expected), NOR is it displaying the toast message like
Applied code changes without Activity restart
Does anyone know how to get Instant Run to work properly?
Thanks, Igor
The solution to this problem is to update Android Studio to 2.0 Preview 8, gradle wrapper to:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
and to use this gradle dependency:
classpath 'com.android.tools.build:gradle:2.0.0-alpha8'
Instant run works now on my Mac!