1

Recently I have updated my android studio v3.0 to v3.1. in v3.0 when I click on Run button. It automatically complies builds apk and installs app on my phone. But at newer version I have ti rebuild app each time before running application. Otherwise it installs previous compiled APK on my phone. Is their a way to do both at on button click. because its frustrating.

I have searched in settings but no option found.

Umair
  • 6,366
  • 15
  • 42
  • 50

1 Answers1

1

I had the same problem. I fixed the problem provisionally, adding the task 'app: clean' in the Run / Debug Configuratrions before the app is "made". It takes much longer to compile and build the app than before, but it will always install the latest version, at least for me.

  1. Open the Run / Debug Configurations. Can be found to the left of the Run Button.

Run / Debug Configurations

  1. In the configurations you will find at the bottom the section "Before launch". There, you are leaving out "Run Gradle Task".

Adding Run Gradle Task

  1. Under Project you choose your current project and at Task you choose clean.

Select settings

  1. Importantly, the Gradle Task is at the top of the list!

mind the order

  1. Run project

Hope I could help you with that

EGW
  • 59
  • 5