快速入门:在 Windows、Linux 或 Android 上运行语音设备 SDK 示例应用Quickstart: Run the Speech Devices SDK sample app on Windows, Linux or Android

重要

需要语音 SDK 1.11.0 或更高版本。Speech SDK version 1.11.0 or later is required.

本快速入门介绍如何使用适用于 Windows 的语音设备 SDK 来生成支持语音的产品。In this quickstart, you'll learn how to use the Speech Devices SDK for Windows to build a speech-enabled product.

该应用程序是使用语音 SDK 程序包和 Eclipse Java IDE (v4) 在 64 位 Windows 上构建的。The application is built with the Speech SDK package, and the Eclipse Java IDE (v4) on 64-bit Windows. 它在 64 位 Java 8 运行时环境 (JRE) 中运行。It runs on a 64-bit Java 8 runtime environment (JRE).

本指南需要一个包含语音服务资源的 Azure 认知服务帐户。This guide requires an Azure Cognitive Services account with a Speech service resource. 如果没有帐户,可以使用试用帐户获取订阅密钥。If you don't have an account, you can use the trial account to get a subscription key.

示例应用程序的源代码随附在语音设备 SDK 中,The source code for the sample application is included with the Speech Devices SDK. 也可在 GitHub 上获取It's also available on GitHub.

先决条件Prerequisites

本快速入门需要:This quickstart requires:

创建和配置项目Create and configure the project

  1. 启动 Eclipse。Start Eclipse.

  2. 在 Eclipse IDE Launcher 的“工作区”字段中,输入新工作区目录的名称 。In the Eclipse IDE Launcher, in the Workspace field, enter the name of a new workspace directory. 然后选择“启动”。Then select Launch.

    Eclipse Launcher 的屏幕截图

  3. 片刻之后,Eclipse IDE 的主窗口将会显示。In a moment, the main window of the Eclipse IDE appears. 如果出现了欢迎屏幕,请将其关闭。Close the Welcome screen if one is present.

  4. 从 Eclipse 菜单栏上,依次选择“文件” > “新建” > “Java 项目”以新建一个项目。From the Eclipse menu bar, create a new project by choosing File > New > Java Project. 如果不可用,请依次选择“项目”和“Java 项目”。If not available choose Project and then Java Project.

  5. 此时将启动“新建 Java 项目”向导。The New Java Project wizard starts. 浏览示例项目所在的位置。Browse for the location of the sample project. 选择“完成”。Select Finish.

    “新建 Java 项目”向导的屏幕截图

  6. 在“包资源管理器”中,右键单击你的项目。In the Package explorer, right-click your project. 从上下文菜单中选择“配置” > “转换为 Maven 项目”。 Choose Configure > Convert to Maven Project from the context menu. 选择“完成”。Select Finish.

    包资源管理器的屏幕截图

  7. 打开 pom.xml 文件并对其进行编辑。Open the pom.xml file and edit it.

    在文件末尾,在结束标记 </project> 之前,创建 repositoriesdependencies 元素(如此处所示),并确保 version 与当前版本匹配:At the end of the file, before the closing tag </project>, create repositories and dependencies elements, as shown here, and ensure the version matches your current version:

    <repositories>
         <repository>
             <id>maven-cognitiveservices-speech</id>
             <name>Microsoft Cognitive Services Speech Maven Repository</name>
             <url>https://csspeechstorage.blob.core.windows.net/maven/</url>
         </repository>
    </repositories>
    
    <dependencies>
        <dependency>
             <groupId>com.microsoft.cognitiveservices.speech</groupId>
             <artifactId>client-sdk</artifactId>
             <version>1.12.1</version>
        </dependency>
    </dependencies>
    
  8. 将 Windows-x64 的内容复制到 Java 项目位置,如 C:\SDSDK\JRE-Sample-ReleaseCopy the contents of Windows-x64 to the Java Project location, eg C:\SDSDK\JRE-Sample-Release

  9. kws.tableparticipants.propertiesMicrosoft.CognitiveServices.Speech.extension.pma.dll 复制到项目文件夹 target\classesCopy kws.table, participants.properties and Microsoft.CognitiveServices.Speech.extension.pma.dll into the project folder target\classes

配置示例应用程序Configure the sample application

  1. 将语音订阅密钥添加到源代码。Add your speech subscription key to the source code.

    对于语音,你的信息将进入 FunctionsList.javaFor speech, your information goes into FunctionsList.java:

     // Subscription
     private static String SpeechSubscriptionKey = "<enter your subscription info here>";
     private static String SpeechRegion = "chinaeast2"; // You can change this if your speech region is different.
    
  2. 默认关键字为“Computer”。The default keyword (keyword) is "Computer". 还可以尝试所提供的其他关键字之一,例如“Machine”或“Assistant”。You can also try one of the other provided keywords, like "Machine" or "Assistant". 这些备用关键字的资源文件位于语音设备 SDK 的 keyword 文件夹中。The resource files for these alternate keywords are in the Speech Devices SDK, in the keyword folder. 例如,C:\SDSDK\JRE-Sample-Release\keyword\Computer 包含用于关键字“Computer”的文件。For example, C:\SDSDK\JRE-Sample-Release\keyword\Computer contains the files used for the keyword "Computer".

    要使用新的关键字,请更新 FunctionsList.java 中的下面一行,并将关键字复制到应用。To use a new keyword, update the following line in FunctionsList.java, and copy the keyword to your app. 例如,要使用关键字包 machine.zip 中的关键字“Machine”,请执行以下操作:For example, to use the keyword 'Machine' from the keyword package machine.zip:

    • kws.table 文件从 zip 包复制到项目文件夹“target/classes”中。Copy the kws.table file from the zip package into the project folder target/classes.

    • 使用关键字名称更新 FunctionsList.javaUpdate the FunctionsList.java with the keyword name:

      private static final String Keyword = "Machine";
      

从 Eclipse 运行示例应用程序Run the sample application from Eclipse

  1. 从 Eclipse 菜单栏中,依次选择“运行” > “运行方式” > “Java 应用程序”。From the Eclipse menu bar, Run > Run As > Java Application. 然后选择“FunctionsList”和“确定”。 Then select FunctionsList and OK.

    选择 Java 应用程序的屏幕截图

  2. 语音设备 SDK 示例应用程序将会启动,并显示以下选项:The Speech Devices SDK example application starts and displays the following options:

    示例语音设备 SDK 的示例应用程序和选项

创建并运行独立应用程序Create and run a standalone application

  1. 在“包资源管理器”中,右键单击你的项目。In the Package explorer, right-click your project. 选择“导出”。Choose Export.

  2. 此时将显示“导出”窗口。The Export window appears. 展开“Java”,选择“可运行的 JAR 文件”,然后选择“下一步”。Expand Java and select Runnable JAR file and then select Next.

    “导出”窗口的屏幕截图

  3. 此时将显示“可运行的 JAR 文件导出”窗口。The Runnable JAR File Export window appears. 为应用程序选择“导出目标”,然后选择“完成”。Choose an Export destination for the application, and then select Finish.

    “可运行的 JAR 文件导出”的屏幕截图

  4. 请将 kws.tableparticipants.propertiesunimic_runtime.dllpma.dllMicrosoft.CognitiveServices.Speech.extension.pma.dll 放入上面选择的目标文件夹中,因为该应用程序需要这些文件。Please put kws.table, participants.properties, unimic_runtime.dll, pma.dll and Microsoft.CognitiveServices.Speech.extension.pma.dll in the destination folder chosen above as these files are needed by the application.

  5. 运行独立的应用程序To run the standalone application

    java -jar SpeechDemo.jar
    

本快速入门介绍如何使用适用于 Linux 的语音设备 SDK 来生成支持语音的产品。In this quickstart, you'll learn how to use the Speech Devices SDK for Linux to build a speech-enabled product.

该应用程序是使用语音 SDK 程序包和 Eclipse Java IDE (v4) 在 64 位 Linux(Ubuntu 16.04、Ubuntu 18.04、Debian 9、RHEL 7/8、CentOS 7/8)上构建的。The application is built with the Speech SDK package, and the Eclipse Java IDE (v4) on 64-bit Linux (Ubuntu 16.04, Ubuntu 18.04, Debian 9, RHEL 7/8, CentOS 7/8). 它在 64 位 Java 8 运行时环境 (JRE) 中运行。It runs on a 64-bit Java 8 runtime environment (JRE).

本指南需要一个包含语音服务资源的 Azure 认知服务帐户。This guide requires an Azure Cognitive Services account with a Speech service resource. 如果没有帐户,可以使用试用帐户获取订阅密钥。If you don't have an account, you can use the trial account to get a subscription key.

示例应用程序的源代码随附在语音设备 SDK 中,The source code for the sample application is included with the Speech Devices SDK. 也可在 GitHub 上获取It's also available on GitHub.

先决条件Prerequisites

本快速入门需要:This quickstart requires:

  • 操作系统:64 位 Linux(Ubuntu 16.04、Ubuntu 18.04、Debian 9、RHEL 7/8、CentOS 7/8)Operating System: 64-bit Linux (Ubuntu 16.04, Ubuntu 18.04, Debian 9, RHEL 7/8, CentOS 7/8)
  • Azure Kinect DKAzure Kinect DK
  • Eclipse Java IDEEclipse Java IDE
  • 仅限 Java 8JDK 8Java 8 or JDK 8 only.
  • 语音服务的 Azure 订阅密钥。An Azure subscription key for the Speech service. 获取一个试用版Get one for trial.
  • 下载用于 Java 的语音设备 SDK 的最新版本,并将 .zip 提取到工作目录。Download the latest version of the Speech Devices SDK for Java, and extract the .zip to your working directory.

    备注

    本快速入门假设应用已解压缩到 /home/wcaltest/JRE-Sample-ReleaseThis quickstart assumes that the app is extracted to /home/wcaltest/JRE-Sample-Release

确保在启动 Eclipse 之前安装这些依赖项。Make sure these dependencies are installed before starting Eclipse.

创建和配置项目Create and configure the project

  1. 启动 Eclipse。Start Eclipse.

  2. 在 Eclipse IDE Launcher 的“工作区”字段中,输入新工作区目录的名称 。In the Eclipse IDE Launcher, in the Workspace field, enter the name of a new workspace directory. 然后选择“启动”。Then select Launch.

    Eclipse Launcher 的屏幕截图

  3. 片刻之后,Eclipse IDE 的主窗口将会显示。In a moment, the main window of the Eclipse IDE appears. 如果出现了欢迎屏幕,请将其关闭。Close the Welcome screen if one is present.

  4. 从 Eclipse 菜单栏上,依次选择“文件” > “新建” > “Java 项目”以新建一个项目。From the Eclipse menu bar, create a new project by choosing File > New > Java Project. 如果不可用,请依次选择“项目”和“Java 项目”。If not available choose Project and then Java Project.

  5. 此时将启动“新建 Java 项目”向导。The New Java Project wizard starts. 浏览示例项目所在的位置。Browse for the location of the sample project. 选择“完成”。Select Finish.

    “新建 Java 项目”向导的屏幕截图

  6. 在“包资源管理器”中,右键单击你的项目。In the Package explorer, right-click your project. 从上下文菜单中选择“配置” > “转换为 Maven 项目”。 Choose Configure > Convert to Maven Project from the context menu. 选择“完成”。Select Finish.

    包资源管理器的屏幕截图

  7. 打开 pom.xml 文件并对其进行编辑。Open the pom.xml file and edit it.

    在文件末尾,在结束标记 </project> 之前,创建 repositoriesdependencies 元素(如此处所示),并确保 version 与当前版本匹配:At the end of the file, before the closing tag </project>, create repositories and dependencies elements, as shown here, and ensure the version matches your current version:

    <repositories>
         <repository>
             <id>maven-cognitiveservices-speech</id>
             <name>Microsoft Cognitive Services Speech Maven Repository</name>
             <url>https://csspeechstorage.blob.core.windows.net/maven/</url>
         </repository>
    </repositories>
    
    <dependencies>
        <dependency>
             <groupId>com.microsoft.cognitiveservices.speech</groupId>
             <artifactId>client-sdk</artifactId>
             <version>1.12.1</version>
        </dependency>
    </dependencies>
    
  8. 在“包资源管理器”中,右键单击你的项目。In the Package explorer, right-click your project. 选择“属性”,然后依次选择“运行/调试设置” > “新建...”Choose Properties, then Run/Debug Settings > New… > Java 应用程序 > Java Application.

  9. 此时将显示“编辑配置”窗口。The Edit Configuration window appears. 在“名称”字段中,输入 Main,并对“Main 类”使用“搜索” ,以查找和选择 com.microsoft.cognitiveservices.speech.samples.FunctionsListIn the Name field enter Main, and use Search for the Main Class to find and select com.microsoft.cognitiveservices.speech.samples.FunctionsList.

    “编辑启动配置”的屏幕截图

  10. Linux-armLinux-x64 中将目标体系结构的音频二进制文件复制到 Java 项目位置,例如 /home/wcaltest/JRE-Sample-ReleaseCopy the audio binaries for your target architecture, from either Linux-arm or Linux-x64, to the Java Project location, eg /home/wcaltest/JRE-Sample-Release

  11. 同样从“编辑配置”窗口中,选择“环境”页和“新建”。Also from the Edit Configuration window select the Environment page and New. 此时将显示“新环境变量”窗口。The New Environment Variable window appears. 在“名称”字段中输入 LD_LIBRARY_PATH,并在“值”字段中输入包含 *.so 文件的文件夹,例如 /home/wcaltest/JRE-Sample-ReleaseIn the Name field enter LD_LIBRARY_PATH and in the value field enter the folder containing the *.so files, for example /home/wcaltest/JRE-Sample-Release

  12. kws.tableparticipants.properties 复制到项目文件夹 target/classesCopy kws.table and participants.properties into the project folder target/classes

配置示例应用程序Configure the sample application

  1. 将语音订阅密钥添加到源代码。Add your speech subscription key to the source code. 如果想要尝试意向识别,还需要添加语言理解服务订阅密钥和应用程序 ID。If you want to try intent recognition, also add your Language Understanding service subscription key and application ID.

    对于语音和 LUIS,你的信息将进入 FunctionsList.javaFor speech and LUIS, your information goes into FunctionsList.java:

     // Subscription
     private static String SpeechSubscriptionKey = "<enter your subscription info here>";
     private static String SpeechRegion = "chinaeast2"; // You can change this if your speech region is different.
    
  2. 默认关键字为“Computer”。The default keyword (keyword) is "Computer". 还可以尝试所提供的其他关键字之一,例如“Machine”或“Assistant”。You can also try one of the other provided keywords, like "Machine" or "Assistant". 这些备用关键字的资源文件位于语音设备 SDK 的 keyword 文件夹中。The resource files for these alternate keywords are in the Speech Devices SDK, in the keyword folder. 例如,/home/wcaltest/JRE-Sample-Release/keyword/Computer 包含用于关键字“Computer”的文件。For example, /home/wcaltest/JRE-Sample-Release/keyword/Computer contains the files used for the keyword "Computer".

    要使用新的关键字,请更新 FunctionsList.java 中的下面一行,并将关键字复制到应用。To use a new keyword, update the following line in FunctionsList.java, and copy the keyword to your app. 例如,要使用关键字包 machine.zip 中的关键字“Machine”,请执行以下操作:For example, to use the keyword 'Machine' from the keyword package machine.zip:

    • kws.table 文件从 zip 包复制到项目文件夹“target/classes”中。Copy the kws.table file from the zip package into the project folder target/classes.

    • 使用关键字名称更新 FunctionsList.javaUpdate the FunctionsList.java with the keyword name:

      private static final String Keyword = "Machine";
      

从 Eclipse 运行示例应用程序Run the sample application from Eclipse

  1. 从 Eclipse 菜单栏中,依次选择“运行” > “运行”From the Eclipse menu bar, Run > Run

  2. 语音设备 SDK 示例应用程序将会启动,并显示以下选项:The Speech Devices SDK example application starts and displays the following options:

    示例语音设备 SDK 的示例应用程序和选项

创建并运行独立应用程序Create and run standalone the application

  1. 在“包资源管理器”中,右键单击你的项目。In the Package explorer, right-click your project. 选择“导出”。Choose Export.

  2. 此时将显示“导出”窗口。The Export window appears. 展开“Java”,选择“可运行的 JAR 文件”,然后选择“下一步”。Expand Java and select Runnable JAR file and then select Next.

    “导出”窗口的屏幕截图

  3. 此时将显示“可运行的 JAR 文件导出”窗口。The Runnable JAR File Export window appears. 为应用程序选择“导出目标”,然后选择“完成”。Choose an Export destination for the application, and then select Finish.

    “可运行的 JAR 文件导出”的屏幕截图

  4. 请将 kws.tableparticipants.properties 放入上面选择的目标文件夹中,因为该应用程序需要这些文件。Please put kws.table and participants.properties in the destination folder chosen above as these files are needed by the application.

  5. 将 LD_LIBRARY_LIB 设置为包含 *.so 文件的文件夹Set the LD_LIBRARY_LIB to the folder containing the *.so files

    export LD_LIBRARY_PATH=/home/wcaltest/JRE-Sample-Release
    
  6. 运行独立的应用程序To run the standalone application

    java -jar SpeechDemo.jar
    

本快速入门介绍如何使用适用于 Android 的语音设备 SDK 来生成支持语音的产品。In this quickstart, you'll learn how to use the Speech Devices SDK for Android to build a speech-enabled product.

本指南需要一个包含语音服务资源的 Azure 认知服务帐户。This guide requires an Azure Cognitive Services account with a Speech service resource. 如果没有帐户,可以使用试用帐户获取订阅密钥。If you don't have an account, you can use the trial account to get a subscription key.

示例应用程序的源代码随附在语音设备 SDK 中,The source code for the sample application is included with the Speech Devices SDK. 也可在 GitHub 上获取It's also available on GitHub.

先决条件Prerequisites

开始使用语音设备 SDK 之前,需要:Before you start using the Speech Devices SDK, you'll need to:

""""

设置设备Set up the device

  1. 在计算机上启动 Vysor。Start Vysor on your computer.

    Vysor

  2. 你的设备应列在“选择设备”下。Your device should be listed under Choose a device. 选择设备旁边的“视图”按钮。Select the View button next to the device.

  3. 选择文件夹图标,然后选择“设置” > “WLAN”连接到无线网络。 Connect to your wireless network by selecting the folder icon, and then select Settings > WLAN.

    Vysor WLAN

    备注

    如果你的公司有关于将设备连接到 Wi-Fi 系统的政策,则你需要获取 MAC 地址并联系 IT 部门来了解如何将它连接到公司的 Wi-Fi。If your company has policies about connecting devices to its Wi-Fi system, you need to obtain the MAC address and contact your IT department about how to connect it to your company's Wi-Fi.

    若要查找开发工具包的 MAC 地址,请在开发工具包的桌面上选择文件夹图标。To find the MAC address of the dev kit, select the file folder icon on the desktop of the dev kit.

    Vysor 文件夹

    Select Settings. 搜索“mac 地址”,然后选择“Mac 地址” > “高级 WLAN”。 Search for "mac address", and then select Mac address > Advanced WLAN. 记下对话框底部附近显示的 MAC 地址。Write down the MAC address that appears near the bottom of the dialog box.

    Vysor MAC 地址

    某些公司可能会限制设备可以连接到其 Wi-Fi 系统的时长。Some companies might have a time limit on how long a device can be connected to their Wi-Fi system. 在一定的天数后,可能需要延长开发工具包在 Wi-Fi 系统中的注册。You might need to extend the dev kit's registration with your Wi-Fi system after a specific number of days.

运行示例应用程序Run the sample application

若要验证开发工具包设置,请生成并安装示例应用程序:To validate your development kit setup, build and install the sample application:

  1. 启动 Android Studio。Start Android Studio.

  2. 选择“打开现有 Android Studio 项目”。Select Open an existing Android Studio project.

    Android Studio - 打开现有项目

  3. 转到 C:\SDSDK\Android-Sample-Release\example。Go to C:\SDSDK\Android-Sample-Release\example. 选择“确定”打开示例项目。Select OK to open the example project.

  4. 配置 Gradle 以引用语音 SDK。Configure gradle to reference the Speech SDK. 可以在 Android Studio 的 Gradle Scripts 下找到以下文件。The following files can be found under Gradle Scripts in Android Studio.

    通过添加 maven 行更新 build.gradle(Project:example) ,allprojects 块应该与下面匹配。Update the build.gradle(Project:example), the allprojects block should match below, by adding the maven lines.

    allprojects {
        repositories {
            google()
            jcenter()
            mavenCentral()
            maven {
                url 'https://csspeechstorage.blob.core.windows.net/maven/'
            }
        }
    }
    

    通过将以下行添加到 dependencies 节来更新 build.gradle(Module:app)Update the build.gradle(Module:app) by adding this line to the dependencies section.

    implementation'com.microsoft.cognitiveservices.speech:client-sdk:1.12.1'
    
  5. 将语音订阅密钥添加到源代码。Add your speech subscription key to the source code.

    对于语音和 LUIS,你的信息会进入 MainActivity.java:For speech and LUIS, your information goes into MainActivity.java:

     // Subscription
     private static String SpeechSubscriptionKey = "<enter your subscription info here>";
     private static String SpeechRegion = "chinaeast2"; // You can change this if your speech region is different.
    
  6. 默认关键字为“Computer”。The default keyword is "Computer". 还可以尝试所提供的其他关键字之一,例如“Machine”或“Assistant”。You can also try one of the other provided keywords, like "Machine" or "Assistant". 这些备用关键字的资源文件位于语音设备 SDK 的 keyword 文件夹中。The resource files for these alternate keywords are in the Speech Devices SDK, in the keyword folder. 例如,C:\SDSDK\Android-Sample-Release\keyword\Computer 包含用于关键字“Computer”的文件。For example, C:\SDSDK\Android-Sample-Release\keyword\Computer contains the files used for the keyword "Computer".

    要使用新的关键字,请更新 MainActivity.java 中的下面两行,并将关键字包复制到应用。To use a new keyword, update the following two lines in MainActivity.java, and copy the keyword package to your app. 例如,若要使用关键字包 kws-machine.zip 中的关键字“Machine”,请执行以下操作:For example, to use the keyword 'Machine' from the keyword package kws-machine.zip:

    • 将该关键字包复制到“C:\SDSDK\Android-Sample-Release\example\app\src\main\assets"”文件夹中。Copy the keyword package into the folder "C:\SDSDK\Android-Sample-Release\example\app\src\main\assets".

    • 使用关键字和包名称更新 MainActivity.javaUpdate the MainActivity.java with the keyword and the package name:

      private static final String Keyword = "Machine";
      private static final String KeywordModel = "kws-machine.zip" // set your own keyword package name.
      
  7. 更新包含麦克风阵列几何设置的以下行:Update the following lines, which contain the microphone array geometry settings:

    private static final String DeviceGeometry = "Circular6+1";
    private static final String SelectedGeometry = "Circular6+1";
    

    此表列出了支持的值:This table lists supported values:

    变量Variable 含义Meaning 可用值Available values
    DeviceGeometry 物理麦克风配置Physical mic configuration 环形开发工具包:Circular6+1For a circular dev kit: Circular6+1
    线性开发工具包:Linear4For a linear dev kit: Linear4
    SelectedGeometry 软件麦克风配置Software mic configuration 使用所有麦克风的环形开发工具包:Circular6+1For a circular dev kit that uses all mics: Circular6+1
    使用四个麦克风的环形开发工具包:Circular3+1For a circular dev kit that uses four mics: Circular3+1
    使用所有麦克风的线性开发工具包:Linear4For a linear dev kit that uses all mics: Linear4
    使用两个麦克风的线性开发工具包:Linear2For a linear dev kit that uses two mics: Linear2
  8. 若要生成应用程序,请在“运行”菜单中选择“运行‘应用’”。 To build the application, on the Run menu, select Run 'app'. 此时会显示“选择部署目标”对话框。The Select Deployment Target dialog box appears.

  9. 选择设备,然后选择“确定”,将应用程序部署到设备。Select your device, and then select OK to deploy the application to the device.

    “选择部署目标”对话框

  10. 语音设备 SDK 示例应用程序将会启动,并显示以下选项:The Speech Devices SDK example application starts and displays the following options:

    示例语音设备 SDK 的示例应用程序和选项

  11. 尽情体验吧!Experiment!

故障排除Troubleshooting

如果无法连接到语音设备。If you cannot connect to the Speech Device. 在命令提示符窗口中键入以下命令。Type the following command in a Command Prompt window. 这会返回设备列表:It will return a list of devices:

 adb devices

备注

此命令使用 Android Debug Bridge adb.exe,它是 Android Studio 安装的一部分。This command uses the Android Debug Bridge, adb.exe, which is part of the Android Studio installation. 此工具位于 C:\Users[用户名]\AppData\Local\Android\Sdk\platform-tools 中。This tool is located in C:\Users[user name]\AppData\Local\Android\Sdk\platform-tools. 可将该目录添加到你的路径,以便更轻松地调用 adbYou can add this directory to your path to make it more convenient to invoke adb. 否则,必须在调用 adb 必须在每个调用 adb 的命令中指定到 adb.exe 的完整安装路径。Otherwise, you must specify the full path to your installation of adb.exe in every command that invokes adb.

如果看到 no devices/emulators found 错误,请检查 USB 电缆是否已连接,并确保使用了高品质的电缆。If you see an error no devices/emulators found then check your USB cable is connected and ensure a high quality cable is used.

后续步骤Next steps