How to retrieve path to ADB in build.gradle

前端 未结 6 1329
無奈伤痛
無奈伤痛 2021-02-05 13:01

I trying to start application via gradle task.


task runDebug(dependsOn: [\'installDebug\', \'run\']) {
}

task run(type: Exec) {
comm         


        
6条回答
  •  一整个雨季
    2021-02-05 13:25

    In Windows you can just register an application path for adb.exe with the following .reg file:

    REGEDIT4
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\adb.exe]
    @="D:\\android\\android-studio\\sdk\\platform-tools\\adb.exe"
    "Path"="D:\\android\\android-studio\\sdk\\platform-tools"
    

    and just keep your original commandline

提交回复
热议问题