I am aware that you can fully disable instant run(the new Android 2.0 functionality). However I do like the feature except in some cases: -When making changes to a layout file, it often does not pick up the changes causing Nullpointer when accessing those resources.
Is there a way to bypass instant run? And force a re-installation?
I do know that changes the AndroidManifest forces this but that's not convenient.
If you need to deploy a clean build, select Run
> Clean and Rerun 'app'
from the main menu, or hold down the Shift
key while clicking Rerun
. This action stops the running app, performs a full clean build, and deploys the new APK to your target device.
See also the Instant Run documentation, paragraph "Using Rerun"
The behaviour of Instant Run has changed in Android Studio 2.3
Run
Force a cold swap and an app restart. If you make a change to the app manifest or a resource referenced by the manifest, Android Studio always pushes your changes with a full APK reinstall.
Apply changes
Push certain code and resource changes to your running app without building a new APK—and, in some cases, without even restarting the current activity.