21

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.

Enias Cailliau
  • 466
  • 4
  • 15

1 Answers1

22

Android Studio 2.0, 2.1 and 2.2:

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"

Android Studio 2.3:

The behaviour of Instant Run has changed in Android Studio 2.3

Run 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 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.

Community
  • 1
  • 1
Tom Sabel
  • 3,935
  • 33
  • 45