我对 native 脚本很陌生,并且尝试过在设备或模拟器上进行测试。这就是我得到的。
C:\Users\Muzi J\Documents\tns\HelloWorld>tns run android --device 4TE7N17106003969
Copying template files...
- Installing tns-androidInstalling tns-android
C:\Users\Muzi J\Documents\tns\HelloWorld
`-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2b5f4558064a454f5944424f6b19051e051b" rel="noreferrer noopener nofollow">[email protected]</a>
Exception: The plugin <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e3978d90ce828d87918c8a87a3d1cdd6cdd3" rel="noreferrer noopener nofollow">[email protected]</a> is already installed
最佳答案
您可以尝试以下几种方法:
删除您的平台文件夹并删除主 package.json 中包含
"android": "2.5.x"
的行项目,然后执行tns platform add android
尝试将代码移动到一个没有空格的文件夹中。我最近在名称中的空格导致构建问题的问题中发现了一些问题。
关于NativeScript tns run android --device/emulator 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43609932/