Maybe I'm wrong, I donβt think, but it is possible when you pass Android Studio, but using the apk assembly and installing it with Android Debug Bridge (ADB), you should get the desired behavior.
When the project compiles, AS creates apk output. Usually this should be specified by app-debug.apk and located in the build/outputs/apk/ folder:
Your .apk file (signed with the release or debug key) is in your build / directory module after creating your application.
cf. Work in the emulator
Using adb , you can install this apk, previously generated (and I believe, without compiling again) on the device using the install command:
$ adb install -r path/to/app-debug.apk
After installation, you should receive a command to launch the application. A little research led me to "How to launch an Android application from the command line?" :
$ adb shell $ adb am start -n my.package.name/my.package.name.MyActivity
And then you could combine them in one line to launch apk right after installing it. It looks like this:
$ adb install -r path/to/app-debug.apk && adb shell am start -n my.package.name/my.package.name.MyActivity
Therefore, the application will work without compilation.
source share