Error -4048 while running 'npx cap add android'

huangapple go评论64阅读模式
英文:

Error -4048 while running 'npx cap add android'

问题

我有一个Ionic 4 Cordova应用程序。我已经集成了Capacitor。现在我正在尝试添加Android平台,但我遇到了以下错误:
Error -4048 while running 'npx cap add android'

我在网络上没有找到任何相关的解决方案。

英文:

I have ionic 4 cordova app. I integrated with Capacitor. Now I am trying to add Android platform and I am getting below error:
Error -4048 while running 'npx cap add android'

I didn't found any relevant solution on web.

答案1

得分: 1

尝试

> npm cache verify

如果这不起作用

> npm cache clean --force

[参考][1]

  [1]: https://stackoverflow.com/questions/30860795/fail-to-install-npm-package-npm-err-errno-4048
英文:

try

> npm cache verify

if this doesn't work

> npm cache clean --force

Reference

答案2

得分: 0

看起来你正在尝试将电容器添加到现有项目中。尝试移除不支持的 Cordova 插件,应该可以正常工作。

英文:

It seems like you are trying to add capacitor to existing project. Try removing unsupported Cordova plugins, it should work.

答案3

得分: 0

我找到了解决这个问题的方法。只需卸载 Capacitor 不支持的 Cordova 插件,然后添加 Android。以下是不支持的插件列表:https://capacitor.ionicframework.com/docs/cordova/known-incompatible-plugins/

英文:

Finally I found solution to this problem. Just uninstall Cordova plugins which are not supported by Capacitor. Then Add Android. Here is the list of unsupported plugins https://capacitor.ionicframework.com/docs/cordova/known-incompatible-plugins/

huangapple
  • 本文由 发表于 2020年1月3日 20:53:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/59578992.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定