Supinder Singh
Supinder Singh

Reputation: 31

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: Terminal image

I didn't found any relevant solution on web.

Upvotes: 2

Views: 1558

Answers (3)

Supinder Singh
Supinder Singh

Reputation: 31

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/

Upvotes: 0

DJ Mutti
DJ Mutti

Reputation: 139

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

Upvotes: 0

Chetan Bansal
Chetan Bansal

Reputation: 1934

try

npm cache verify

if this doesn't work

npm cache clean --force

Reference

Upvotes: 1

Related Questions