Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 将Android平台添加到Ionic v3.9.2时出错_Angularjs_Cordova_Ionic Framework - Fatal编程技术网

Angularjs 将Android平台添加到Ionic v3.9.2时出错

Angularjs 将Android平台添加到Ionic v3.9.2时出错,angularjs,cordova,ionic-framework,Angularjs,Cordova,Ionic Framework,我使用的是带有节点5.3.0的Ionic版本3.9.2。我试图将android平台添加到我的应用程序中,但显示如下错误: Running command - failed! ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2 Error: Failed to fetch platform cordova-android@~6.2.2 Probably this is either a connection

我使用的是带有节点5.3.0的Ionic版本3.9.2。我试图将android平台添加到我的应用程序中,但显示如下错误:

Running command - failed!
ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2

   Error: Failed to fetch platform cordova-android@~6.2.2
   Probably this is either a connection problem, or platform spec is incorrect.
   Check your connection and platform name/version/URL.
   Error: cmd: Command failed with exit code 4294963248 Error output:
   npm ERR! path D:\Ionic\SimBing\node_modules\fsevents\node_modules\getpass\node_modules
   npm ERR! code EPERM
   npm ERR! errno -4048
   npm ERR! syscall lstat
   npm ERR! Error: EPERM: operation not permitted, lstat
   'D:\Ionic\SimBing\node_modules\fsevents\node_modules\getpass\node_modules'
   npm ERR!     at Error (native)
   npm ERR!  { Error: EPERM: operation not permitted, lstat
   'D:\Ionic\SimBing\node_modules\fsevents\node_modules\getpass\node_modules'
   npm ERR!     at Error (native)
   npm ERR!   stack: 'Error: EPERM: operation not permitted, lstat
   \'D:\\Ionic\\SimBing\\node_modules\\fsevents\\node_modules\\getpass\\node_modules\'\n    at

   Error (native)',
   npm ERR!   errno: -4048,
   npm ERR!   code: 'EPERM',
   npm ERR!   syscall: 'lstat',
   npm ERR!   path:
   'D:\\Ionic\\SimBing\\node_modules\\fsevents\\node_modules\\getpass\\node_modules' }
   npm ERR!
   npm ERR! Please try running this command again as root/Administrator.

   npm ERR! A complete log of this run can be found in:
   npm ERR!
   C:\Users\eficaz2020\AppData\Roaming\npm-cache\_logs\2017-09-12T11_09_42_574Z-debug.log

如果您使用的是Windows,则应打开Windows环境变量并将其添加到系统变量中的路径C:\Windows\System32,然后关闭并重新打开cmd,然后重试。另外,请确保以管理员身份运行命令

C:/Users/%USER%/.cordova/lib/npm cache/cordova android下检查cordova提供的android版本(如果您使用的是Windows),并安装相应的android平台版本

如果所有这些都不起作用,请执行以下操作:

1-删除android平台

2-添加导致错误的特定版本的android

cordova platform add android@6.2.2
3-您也可以基于以下命令尝试

cordova platform add android --nofetch