Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio: How to force re-installation (Disable instant run for once)?

Tags:

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.

like image 642
Enias Cailliau Avatar asked Apr 19 '16 11:04

Enias Cailliau


People also ask

Why is Android studio reinstalling every time I open it?

Maybe it is not installing properly. Try to look at your installed programs and see if you can find it. If you don't find it, you are having some installation problem. Also, make sure you are not running the instaltor instead of the shortcut.

Does Android studio still have instant run?

Instant Run is currently available only in Android Studio 2.0, and higher. We will continue to improve the feature in subsequent releases.


1 Answers

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.

like image 74
Tom Sabel Avatar answered Nov 11 '22 11:11

Tom Sabel