tns 运行 未在 Mac 中的模拟器中加载应用程序
tns run doesn't load the app in emulator in Mac
tns device android --available-devices
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
Available emulators
Calculated width 89 is above terminal width: 80. You can try using smaller value for min_column_width. Current value is: 15
┌───────────────┬──────────┬───────────┬───────────────┬───────────────┬────────────┐
│ Device Name │ Platform │ Version │ Device │ Image │ Error Help │
│ │ │ │ Identifier │ Identifier │ │
│ Pixel_2_API_R │ Android │ │ │ Pixel_2_API_R │ │
└───────────────┴──────────┴───────────┴───────────────┴───────────────┴────────────┘
Connected devices & emulators
Searching for devices...
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
tns doctor也列出了不错的结果
✔ Getting environment information
No issues were detected.
✔ 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.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 10.0.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 7.0.7 and the latest available version is 7.0.8.
但是,当我 运行 tns run android
我看到以下内容时:
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
Searching for devices...
Cannot find connected devices.
Emulator start failed with: No emulator image available for device identifier 'undefined'.
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'.
不过,普通的 tns 设备不会列出任何内容。
tns device
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
Connected devices & emulators
Searching for devices...
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
$ emulator @Pixel_2_API_R
不过只是启动了模拟器。
当我运行tns run android
由于某种原因,它无法启动模拟器和 运行 应用程序。我错过了什么?
这 link 有帮助。我可以执行 tns 运行 android 并在模拟器上加载应用程序
Cannot find connected devices. Emulator start failed with: Cannot resolve the specified connected device by the provided index or identifier.
tns device android --available-devices
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
Available emulators
Calculated width 89 is above terminal width: 80. You can try using smaller value for min_column_width. Current value is: 15
┌───────────────┬──────────┬───────────┬───────────────┬───────────────┬────────────┐
│ Device Name │ Platform │ Version │ Device │ Image │ Error Help │
│ │ │ │ Identifier │ Identifier │ │
│ Pixel_2_API_R │ Android │ │ │ Pixel_2_API_R │ │
└───────────────┴──────────┴───────────┴───────────────┴───────────────┴────────────┘
Connected devices & emulators
Searching for devices...
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
tns doctor也列出了不错的结果
✔ Getting environment information
No issues were detected.
✔ 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.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 10.0.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 7.0.7 and the latest available version is 7.0.8.
但是,当我 运行 tns run android
我看到以下内容时:
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
Searching for devices...
Cannot find connected devices.
Emulator start failed with: No emulator image available for device identifier 'undefined'.
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'.
不过,普通的 tns 设备不会列出任何内容。
tns device
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
Connected devices & emulators
Searching for devices...
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
$ emulator @Pixel_2_API_R
不过只是启动了模拟器。
当我运行tns run android
由于某种原因,它无法启动模拟器和 运行 应用程序。我错过了什么?
这 link 有帮助。我可以执行 tns 运行 android 并在模拟器上加载应用程序
Cannot find connected devices. Emulator start failed with: Cannot resolve the specified connected device by the provided index or identifier.