找不到连接的设备.模拟器启动失败:无法通过提供的索引或标识符解析指定的连接设备. [英] Cannot find connected devices. Emulator start failed with: Cannot resolve the specified connected device by the provided index or identifier.

查看:145
本文介绍了找不到连接的设备.模拟器启动失败:无法通过提供的索引或标识符解析指定的连接设备.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习 NativeScript 和运行 tns platform add android 时,我收到以下错误:我按照这一步:

I'm learning NativeScript and When running tns platform add android I receive the following error: I follow this step:

  1. 以管理员身份运行命令提示符.
  2. @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" &&SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
  3. choco install googlechrome -y
  4. choco install nodejs-lts -y
  5. choco install jdk8 -y
  6. choco install android-sdk -y
  7. "%ANDROID_HOME%\tools\bin\sdkmanager" "platform-tools" "platforms;android-25" "build-tools;25.0.2" "extras;android;m2repository" "extras;google;m2repository"
  8. @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://nativescript.org/setup/win-avd'))"
  9. choco install androidstudio -y
  10. npm i -g nativescript
  11. tns 医生我看到未检测到任何问题"你很高兴!
  12. tns 创建 HelloWorld --template nativescript-template-tutorial
  13. cd HelloWorld
  14. tns 运行安卓
  1. Run the command prompt as an Administrator.
  2. @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
  3. choco install googlechrome -y
  4. choco install nodejs-lts -y
  5. choco install jdk8 -y
  6. choco install android-sdk -y
  7. "%ANDROID_HOME%\tools\bin\sdkmanager" "platform-tools" "platforms;android-25" "build-tools;25.0.2" "extras;android;m2repository" "extras;google;m2repository"
  8. @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://nativescript.org/setup/win-avd'))"
  9. choco install androidstudio -y
  10. npm i -g nativescript
  11. tns doctor I see "No issues were detected" you are good to go!
  12. tns create HelloWorld --template nativescript-template-tutorial
  13. cd HelloWorld
  14. tns run android

错误:找不到连接的设备.模拟器启动失败:无法解析指定的连接设备提供的索引或标识符.列出当前连接的设备并验证在指定的索引或标识符存在时,运行tns device".列出当前连接的设备并验证指定的标识符 exists,运行tns 设备".要列出可用的模拟器映像,请运行 'tns device --available-devices'.

Error: Cannot find connected devices. Emulator start failed with: Cannot resolve the specified connected device by the provided index or identifier. To list currently connected devices and verify th at the specified index or identifier exists, run 'tns device'. To list currently connected devices and verify that the specified identifier exi sts, run 'tns device'. To list available emulator images, run 'tns device --available-device s'.

推荐答案

首先确定你在 $ANDROID_HOME\tools\bin(默认路径是 .\Android\android-sdk\tools\bin)中的命令线.

First, make sure you are at $ANDROID_HOME\tools\bin (the default path is .\Android\android-sdk\tools\bin) in the command line.

使用 sdkmanager 安装包.

Use the sdkmanager to install the package.

   sdkmanager "system-images;android-27;google_apis_playstore;x86"

查看SDK包列表使用

sdkmanager --list

如果您收到Package path is not valid. Valid system image paths are:ository"错误,请使用:

If you receive a "Package path is not valid. Valid system image paths are:ository" error, use:

sdkmanager --licenses

然后使用创建 AVD

avdmanager create avd -n test -k "system-images;android-27;google_apis_playstore;x86"

这篇关于找不到连接的设备.模拟器启动失败:无法通过提供的索引或标识符解析指定的连接设备.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆