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 messa
I ran into this problem when running ProcessPhoenix. Instead of disabling it completely, I just disabled it for my debug build.
Instead of compile
I use
releaseCompile 'com.jakewharton:process-phoenix:2.0.0'
And to not break the build I use reflection to trigger the application process restart:
try {
Class clazz = Class.forName("com.jakewharton.processphoenix.ProcessPhoenix");
Method triggerRebirthMethod = clazz.getMethod("triggerRebirth", Context.class);
triggerRebirthMethod.invoke(this, new Object[]{getActivity()});
} catch (Exception e) {
// Exception handling
}
So now I can still use Instant Run and keep the lib included. :)
(Of course, reflection is never ideal, but the app process restart is only used in one rare particular case in the app.)