我在这里关注此tutorial以创建一个新的空项目。这没有任何错误。 但是,之后我正在执行
ionic emulate android
命令,我收到以下错误:
Running 'emulate:before' gulp task before emulate
[20:53:56] Starting 'clean'...
[20:53:56] Finished 'clean' after 26 ms
[20:53:56] Starting 'build'...
[20:53:56] Starting 'sass'...
[20:53:56] Starting 'html'...
[20:53:56] Starting 'fonts'...
[20:53:56] Starting 'scripts'...
[20:53:56] Finished 'html' after 45 ms
[20:53:56] Finished 'scripts' after 116 ms
[20:53:56] Finished 'fonts' after 117 ms
[20:53:57] Finished 'sass' after 961 ms
[20:54:03] Finished 'build' after 7.61 s
[20:54:03] Starting 'emulate:before'...
[20:54:03] Finished 'emulate:before' after 2.77 μs
• You're trying to build for androidbut don't have the platform installed yet.
∆ Installing android for you.
Installing cordova-plugin-device
Installing cordova-plugin-console
Installing cordova-plugin-whitelist
Installing cordova-plugin-splashscreen
Installing cordova-plugin-statusbar
Installing ionic-plugin-keyboard
Caught exception:
Error: Command failed: cordova plugin add --save cordova-plugin-splashscreen
C:\Users\Myuser\AppData\Roaming\npm\node_modules\cordova\node_modules\configstore\index.js:69
throw err;
^
Error: EPERM: operation not permitted, rename 'C:\Users\Myuser\.config\configstore\insight-cordova.json.1699442625' -> 'C:\Users\Myuser\.config\configstore\insight-cordova.json'
但是,我使用管理员权限(Windows 10专业版)运行此功能,我真的不知道为什么会出现此错误。 如果我执行命令
cordova plugin add --save cordova-plugin-splashscreen
手动,它没有任何问题。但是我对所有失败的命令都这样做了,我最终在"未被发现"没有任何具体原因的错误。
现在我不知道如何解决这个问题。