Can you deploy to a device via Gradle from the command line

前端 未结 9 1117
借酒劲吻你
借酒劲吻你 2020-12-07 10:14

What the question says really - can you issue any commands directly to gradlew via the command line to build, package and deploy to a device?

9条回答
  •  暖寄归人
    2020-12-07 11:02

    task appStart(type: Exec, dependsOn: 'installDebug') {
        commandLine android.adbExe, 'shell', 'am', 'start', '-n', 'com.example/.MyActivity'
    }
    

提交回复
热议问题