Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to just install app without building everytime

I want to install a developing app to some emulators and devices for testing.

Just press run, android studio will make, build and then install. It seems useless to make and build everytime if I don't modify code. And building will cost much time.

So, how to just install app without building everytime.

like image 867
ishitcno1 Avatar asked Feb 14 '23 19:02

ishitcno1


2 Answers

It is possible to just install the apk:

adb install -r PATH/TO/PROJECT/build/apk/PROJECT-(release|debug).apk
like image 177
just lerning Avatar answered Feb 24 '23 20:02

just lerning


If you are using Android Studio, open the Terminal window.

Then:

adb install -r app/build/outputs/apk/app-debug.apk

This is a slightly different path than shown in the accepted answer, which may be due to updates in Android Studio's build path. In an example project where a normal build/run takes 30-60 seconds, this took about 1 second in comparison. If the app was already running, it will exit and can be run from its icon in the device OS.

like image 39
sakeboy Avatar answered Feb 24 '23 19:02

sakeboy