1

These are the steps required to run NativeScript App on simulator/Device

  1. $tns install
  2. $tns platform add android
  3. $tns build android
  4. $tns run android --emulator

Steps 1-3 are one time only, but on my machine it takes about 15-30 minutes. and step 4 also take 10-20 minute each time( each time I run the app it should be less).

I have

  • 16GB Ram
  • Intel i5 processor

Does anybody else facing same issues/probles, i have already reinstalled windows 7. or this is $tns command issue. $Ionic running ok.

4

1 回答 1

2

你的时间很可怕!即使在我的带有 4G RAM 的虚拟赛扬 1000M 上,我也能在几秒钟内运行一个新的应用程序。我猜你要么有一些环境问题或网络相关问题(这可能导致你对 npm 的依赖停止!?)

Btw tns run android将准备、构建、部署和运行您的应用程序(即使在此之前没有添加任何平台)

您可以尝试以下方法

tns create myApp
tns run android --log trace

看看是什么导致了延迟。

另外,您是使用 AVD 还是 Genymotion 进行模拟?确保在运行 g 你的 tns 命令之前启动它们,并让它们保持打开状态以避免初始启动。AVD 在执行时通常很慢,并且体节超时。在此处查看有关 android 模拟器的一些信息

于 2016-07-14T14:19:50.587 回答