如何在模拟器和物理设备上使用命令行 "Launch" Android Gradle 应用程序。不只是建造

How to "Launch" Android Gradle App using command line on emulator and physical device. Not just build

如何使用命令行通过命令行在模拟器和物理设备上启动 Android Gradle 应用程序。

模拟器属于 Android Studio。

我试过 gradlew.bat assembleDebug 但它没有 'launch',它只是构建。

使用命令行构建 ->

要使用命令行构建我们的应用程序,您可以使用 -

gradlew assembleDebug (For debug app)

用于在连接的设备上安装 apk -

gradlew installDebug

更多信息,您可以查看-

https://developer.android.com/studio/build/building-cmdline