@nitin0810 wrote:
Hi
I m getting the following error while adding android platform to my project.PS C:\Users\nitin94\Desktop\YugmaV2> ionic cordova platform add android
× cordova platform add android --save - failed!
[ERROR] Exception: Adding android project…Creating Cordova project for the Android platform: Path: platforms\android Package: io.ionic.starter Name: MyApp Activity: MainActivity Android target: android-25 Subproject Path: CordovaLib Android project created with cordova-android@6.1.2 Installing "cordova-plugin-camera" for android Failed to install 'cordova-plugin-camera':Error: cmd: Command failed with exit code ENOENT at ChildProcess.whenDone (C:\Users\nitin94\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:169:23) at emitOne (events.js:96:13) at ChildProcess.emit (events.js:188:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) Error: cmd: Command failed with exit code ENOENT
I had already added the cordova plugins using the cmds
ionic cordova plugin add cordova-plugin-cameraand similar cmds for all the other plugins.
Though platform addition has failed, it has created a platform/android folder in my project with many other files and folder inside it.
My ionic info is:PS C:\Users\nitin94\Desktop\YugmaV2> ionic info
cli packages: (C:\Users\nitin94\Desktop\YugmaV2\node_modules)
@ionic/cli-utils : 1.9.1 ionic (Ionic CLI) : 3.9.1
global packages:
Cordova CLI : 6.5.0
local packages:
@ionic/app-scripts : 2.0.2 Cordova Platforms : android broken Ionic Framework : ionic-angular 3.5.3
System:
Node : v6.11.2 npm : 3.10.10 OS : Windows 10
As u can see , android broken is mentioned in the added platform . I dont understand what does broken mean? I guess it is because of that error.
i have not installed Android SDK/ studio prior adding the plaform, do i need to do that?
Please help if u have any idea.
Posts: 1
Participants: 1