0
votes

when i run

ionic cordova platform add android

Using cordova-fetch for cordova-android@~6.2.2

Adding android project...

Creating Cordova project for the Android platform: Path: platforms\android Package: io.ionic.starter Name: ionicFirebase Activity: MainActivity Android target: android-25 Subproject Path: CordovaLib Android project created with [email protected]

Error: Source path does not exist: resources/android/icon/drawable-hdpi-icon.png

i am try to rm android i found platform array still on config.xml and when i run

ionic cordove resource

√ Collecting resource configuration and source images - done!

[ERROR] No platforms detected. Please run: ionic cordova platform add

and whan i run a gain

ionic cordova platform add android

say same thing error in path !!

this is my ionic info

ionic info

@ionic/cli-utils : 1.12.0 ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.1.0
{{{{{Cordova Platforms  : none}}}}
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v6.16.0
npm  : 4.6.1
OS   : Windows 10

Misc:

backend : pro
2

2 Answers

0
votes

First try to remove android platform through command like

ionic cordova platform rm android

and then try to add it again by

ionic cordova platform add android

Lastly if Its not done then once uninstall npm and install it again to higher version(5.6.0).

0
votes

Th error occurs because the image icon is missing so try the following command after adding the platform by navigating into the project folder

ionic cordova resources

The ionic cordova resources command generates the different sized image for icon and splash screen