Reputation: 13195
I need to install an app on a physical device from Android Studio without it starting automatically because I need to ensure the device is completely isolated from all outside networks, etc. when I launch the app on the phone.
I did some research but could only find the following two irrelevant posts:
Upvotes: 8
Views: 2386
Reputation: 477
For those struggling with Flutter, try the CLI:
Compile the apk:
flutter build apk --debug C:\Users\User1\AndroidStudioFolder\MyApp\app\lib\main\main.dart
Install on the running emulator:
flutter install --debug
I already tested it and it works...
Upvotes: 0
Reputation: 13195
I found the answer at https://developer.android.com/studio/run/rundebugconfig#general-tab .
Steps to install app on device without running it automatically using Android Studio:
note: assumes Android Studio Arctic Fox | 2020.3.1 Patch 1
The option "Nothing" is defined as follows in the documentation link above:
Don’t launch anything when you select Run or Debug. However, if your app is already running and you select Debug, Android Studio attaches the debugger to your app process.
Upvotes: 10