【问题标题】:tns run doesn't load the app in emulator in Mactns run 不会在 Mac 的模拟器中加载应用程序
【发布时间】:2020-09-19 19:38:41
【问题描述】:
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医生也列出了很好的结果

✔ 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 由于某种原因,它无法启动模拟器并运行应用程序。我错过了什么?

【问题讨论】:

  • tns run ios 启动 ios 模拟器但不加载应用程序.....这是我在终端中看到的: tns run ios --force 您正在使用已弃用的 nsconfig.json文件。请注意,当您准备好升级此项目时,NativeScript 7 有一个改进的 nativescript.config.(js|ts) 文件。 NativeScript 的下一个版本将不支持当前的 Xcode 版本 10.0.0。考虑将您的 Xcode 更新到最新的官方版本。正在搜索设备... 无法找到适用的设备来执行操作。确保连接的设备受信任,然后重试。

标签: macos nativescript avd


【解决方案1】:

这个链接有帮助。我可以执行 tns run android 并将应用程序加载到模拟器上

Cannot find connected devices. Emulator start failed with: Cannot resolve the specified connected device by the provided index or identifier.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-05-23
    • 1970-01-01
    • 1970-01-01
    • 2017-04-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多