tns停止识别我的设备。找不到连接的设备

时间:2019-06-11 08:01:40

标签: nativescript nativescript-angular

我正在使用开发一个应用程序 本机脚本5.4.0, tns-core-modules 5.4.2, tns-android 5.4.0

在过去的几天里,我开始收到一条错误消息:找不到连接的设备。

一切正常之前。我能够在RedMi 3设备上部署我的应用程序,并使用tns run android从控制台对其进行调试。

我尝试了很多东西。重新安装nativescript和android,重新配置设备(usb调试处于活动状态)...

adb能够识别设备,但tns不能。另外,我还能够构建调试版本。

我在新计算机上安装并尝试,然后继续出现此问题。我什至尝试使用其他设备。

Error: Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal
    at process.on (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\nativescript-cli.js:22:22)
    at C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:122:15
    at Array.filter (<anonymous>)
    at load (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:120:21)
    at module.exports (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:35:5)
    at Object.<anonymous> (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\node_modules\proper-lockfile\lib\lockfile.js:296:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
Looking for project in 'C:\app\challenger'
Project directory is 'C:\app\challenger'.
Loading extensions.
Asserting extension nativescript-cloud is installed.
Extension nativescript-cloud is installed.
Asserting extension nativescript-starter-kits is installed.
Extension nativescript-starter-kits is installed.
System information:
{ platform: 'win32',
  shell: 'C:\\Windows\\system32\\cmd.exe',
  os: 'Windows 10 Pro 6.3.17134',
  procArch: 'x64',
  nodeVer: '8.11.3',
  npmVer: '5.6.0',
  nodeGypVer: null,
  nativeScriptCliVersion: '5.4.0',
  gitVer: '2.18.0.windows.1',
  dotNetVer: '4.7.03056',
  javacVersion: '1.8.0_211',
  javaVersion: '1.8.0_211',
  adbVer: '1.0.41',
  androidInstalled: true,
  monoVer: null,
  gradleVer: null,
  isAndroidSdkConfiguredCorrectly: true,
  xcodeVer: undefined,
  xcodeprojLocation: null,
  itunesInstalled: false,
  cocoaPodsVer: undefined,
  isCocoaPodsWorkingCorrectly: false,
  isCocoaPodsUpdateRequired: false,
  pythonInfo: null }
Starting watch on killswitch C:\Users\stefa\AppData\Local\Temp\stefa\KillSwitches\cli
Initializing analytics statuses.
spawn: C:\Program Files\nodejs\node.exe "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\detached-processes\cleanup-process.js" "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\bootstrap.js"
Analytics statuses:  { TrackFeatureUsage: 'enabled', TrackExceptions: 'enabled' }
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
  category: 'CLI',
  googleAnalyticsDataType: 'event',
  action: 'Check Local Build Setup',
  label: 'Starting',
  customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
  value: undefined }
spawn: C:\Program Files\nodejs\node.exe "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\services\analytics\analytics-broker-process.js" "C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\bootstrap.js"
Your ANDROID_HOME environment variable is set and points to correct directory.
Your adb from the Android SDK is correctly installed.
The Android SDK is installed.
A compatible Android SDK for compilation is found.
Javac is installed and is configured properly.
The Java Development Kit (JDK) is installed and is configured properly.
Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
  category: 'CLI',
  googleAnalyticsDataType: 'event',
  action: 'Check Local Build Setup',
  label: 'Finished: Is setup correct: true',
  customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
  value: undefined }
Installed Android Targets are:  [ 'android-28' ]
Directories found in C:\Android\android-sdk\build-tools are 28.0.3
Versions found in C:\Android\android-sdk\build-tools are 28.0.3
Selected version is:  28.0.3
Selected targetSdk is: 28
Validate options for platform: Android
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
  category: 'CLI',
  googleAnalyticsDataType: 'pageview',
  path: 'run android',
  title: 'run android',
  customDimensions: { cd5: 'CLI', cd2: 'Angular', cd9: 'false' } }
Will send the following information to Google Analytics: { type: 'googleAnalyticsData',
  category: 'CLI',
  googleAnalyticsDataType: 'event',
  action: 'Options',
  label: '{"hmr":true,"log":"trace","$0":"_localpath","bundle":"webpack","profileDir":"private"}',
  customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
  value: undefined }
Will send the following information to Google Analytics: { type: 'PreviewAppData',
  category: 'CLI',
  googleAnalyticsDataType: 'event',
  action: 'Preview App Data',
  platform: 'Android',
  label: 'Android',
  customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' } }
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
startLookingForDevices; platform is Android
Options for ios-device-discovery { platform: 'Android',
  shouldReturnImmediateResult: false,
  emulator: false }
spawn: C:\Android\android-sdk\platform-tools\adb "start-server"
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 0 }
  exitCode: 3221226356 }
{ characteristics: 'nosdcard nosdcard',
  date: 'Thu Nov 22 02:07:05 CST 2018',
  'date.utc': '1542823625',
  description: 'kenzo-user 6.0.1 MMB29M 8.11.22 release-keys',
  'device.ninur': '64687',
  'display.hardware': '',
  'display.id': 'MMB29M',
  fingerprint: 'Xiaomi/kenzo/kenzo:6.0.1/MMB29M/8.11.22:user/release-keys',
  flavor: 'kenzo-user',
  'hardware.version': 'D2-2',
  host: 'c3-miui-ota-bd74.bj',
  id: 'MMB29M',
  'network.type': '',
  product: 'kenzo',
  project: '',
  'software.version': 'Android6.0.1_10',
  tags: 'release-keys',
  type: 'user',
  user: 'builder',
  all_codenames: 'REL',
  base_os: '',
  bsp: '0.8.1_170609',
  codename: 'REL',
  external: '',
  incremental: '8.11.22',
  internal: '',
  preview_sdk: '0',
  release: '6.0.1',
  sdk: '23',
  security_patch: '2018-07-01',
  versiontype: '',
  board: 'msm8952',
  brand: 'Xiaomi',
  'cpu.abi': 'arm64-v8a',
  'cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi',
  'cpu.abilist32': 'armeabi-v7a,armeabi',
  'cpu.abilist64': 'arm64-v8a',
  cuptsm: 'XIAOMI|ESE|02|01',
  device: 'kenzo',
  first_api_level: '22',
  locale: 'en-GB',
  'locale.language': 'en',
  'locale.region': 'US',
  manufacturer: 'Xiaomi',
  mod_device: 'kenzo_global',
  model: 'Redmi Note 3',
  name: 'kenzo' }
{ characteristics: 'nosdcard nosdcard',
  date: 'Thu Nov 22 02:07:05 CST 2018',
  'date.utc': '1542823625',
  description: 'kenzo-user 6.0.1 MMB29M 8.11.22 release-keys',
  'device.ninur': '64687',
  'display.hardware': '',
  'display.id': 'MMB29M',
  fingerprint: 'Xiaomi/kenzo/kenzo:6.0.1/MMB29M/8.11.22:user/release-keys',
  flavor: 'kenzo-user',
  'hardware.version': 'D2-2',
  host: 'c3-miui-ota-bd74.bj',
  id: 'MMB29M',
  'network.type': '',
  product: 'kenzo',
  project: '',
  'software.version': 'Android6.0.1_10',
  tags: 'release-keys',
  type: 'user',
  user: 'builder',
  all_codenames: 'REL',
  base_os: '',
  bsp: '0.8.1_170609',
  codename: 'REL',
  external: '',
  incremental: '8.11.22',
  internal: '',
  preview_sdk: '0',
  release: '6.0.1',
  sdk: '23',
  security_patch: '2018-07-01',
  versiontype: '',
  board: 'msm8952',
  brand: 'Xiaomi',
  'cpu.abi': 'arm64-v8a',
  'cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi',
  'cpu.abilist32': 'armeabi-v7a,armeabi',
  'cpu.abilist64': 'arm64-v8a',
  cuptsm: 'XIAOMI|ESE|02|01',
  device: 'kenzo',
  first_api_level: '22',
  locale: 'en-GB',
  'locale.language': 'en',
  'locale.region': 'US',
  manufacturer: 'Xiaomi',
  mod_device: 'kenzo_global',
  model: 'Redmi Note 3',
  name: 'kenzo' }
spawn: C:\Android\android-sdk\platform-tools\adb "devices"
execFile: C:\Android\android-sdk\platform-tools\adb "-s" "6301b4cf" "shell" "getprop" "ro.product.manufacturer"
Error while checking for devices. { Error: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer

    at ChildProcess.exithandler (child_process.js:275:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  killed: false,
  code: 3221226356,
  signal: null,
  cmd: 'C:\\Android\\android-sdk\\platform-tools\\adb -s 6301b4cf shell getprop ro.product.manufacturer' }
spawn: C:\Android\android-sdk\platform-tools\adb "devices"
spawn: C:\Android\android-sdk\tools\bin\avdmanager.bat "list" "avds"
Error while trying to get InstallDir property for \Software\Oracle\VirtualBox. More info: Error: QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value..
spawn: player 0
Configuration error for Genymotion { stdout: '', stderr: 'spawn player ENOENT', exitCode: 'ENOENT' }
execFile: C:\Android\android-sdk\platform-tools\adb "-s" "6301b4cf" "shell" "getprop" "ro.product.manufacturer"
Cannot find connected devices.
Emulator start failed with: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer

To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.
Error while initializing devicesService: Exception: Cannot find connected devices.
Emulator start failed with: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer

To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.
Error: Cannot find connected devices.
Emulator start failed with: Command failed: C:\Android\android-sdk\platform-tools\adb -s 6301b4cf shell getprop ro.product.manufacturer

To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.
    at Errors.fail (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:126:28)
    at Errors.failWithoutHelp (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:136:21)
    at DevicesService.<anonymous> (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\mobile\mobile-core\devices-service.js:444:34)
    at Generator.throw (<anonymous>)
    at rejected (C:\Users\stefa\AppData\Roaming\npm\node_modules\nativescript\lib\common\mobile\mobile-core\devices-service.js:11:65)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

0 个答案:

没有答案