2016-04-25 12 views
1

I Android-Plattform hinzufügen Ich versuche aber ionischen, wenn ich hinzufügen, es hält diesen Fehlerionische Plattform Fehler beim Hinzufügen von Android-Plattform

Adding android project... 
Creating Cordova project for the Android platform: 
     Path: platforms\android 
     Package: com.ionicframework.carmart632655 
     Name: CarMart 
     Activity: MainActivity 
     Android target: android-23 
Android project created with [email protected] 
Installing "cordova-plugin-console" for android 
Failed to install 'cordova-plugin-console':Error: cmd: Command failed with exit code ENOENT 
    at ChildProcess.whenDone (C:\Users\UVINDU\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\cordova-common\src\superspawn.js:169:23) 
    at emitOne (events.js:90:13) 
    at ChildProcess.emit (events.js:182:7) 
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) 
    at onErrorNT (internal/child_process.js:344:16) 
    at nextTickCallbackWith2Args (node.js:474:9) 
    at process._tickCallback (node.js:388:17)Error: cmd: Command failed with exit code ENOENT 

Was mit meiner Installation falsch ist

+0

Sie sind mit dem Internet verbunden, wenn Sie eine Plattform hinzufügen? –

+0

Ja, ich habe verbunden – User8

+0

Mögliches Duplikat von [Cordova kann nicht Android mit Exit-Code ENOENT fehlgeschlagen] (http://stackoverflow.com/questions/23422961/cordova-cannot-add-android-failed-with-exit-code-enoent) – CConard96

Antwort

2

Wenn Sie in Windows sind, tritt diese Art von Fehler normalerweise auf, wenn Sie nicht alle erforderlichen Pfade in der Pfadvariablen Ihrer Systemumgebung haben. Vor allem die unten angegebenen Pfadvariablen.

Fügen Sie diese Zeile auf Ihre Systemumgebung Variable Pfad:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Windows\System32; 

Sie auch this heraus überprüfen können. Es gibt das gesamte Installations-Tutorial.

+0

Sie sollten erklären, was dies tut – tmthydvnprt

-1

Haben Sie Setup Ihr ​​Android Studio mit der richtigen Version von adt tools heruntergeladen?

+0

Dies sollte Kommentar nicht sein Antwort –

0

Zuerst deinstallieren Sie node.js und neu installieren Sie danach den folgenden Befehl ausführen.

ionic start {your project directory} --v2 

hier ein Fall beobachtet, i, wenn Sie irgendwelche Plugins für Ihr Projekt erforderlich versuchen vor dem Hinzufügen von Plattform zu installieren, sonst sind wir genauso wie wie unten einige Fehler.

Failed to install 'cordova-plugin-console':Error: cmd: Command failed with exit code ENOENT at ChildProcess.whenDone (C:\Users\TestUser\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\cordova-common\src\superspawn.js:169:23) at emitOne (events.js:90:13) at ChildProcess.emit (events.js:182:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:474:9) at process._tickCallback (node.js:388:17)Error: cmd: Command failed with exit code ENOENT.

Sobald die Installation des Plugins abgeschlossen ist, versuchen Sie, die Plattform hinzuzufügen, sollte es funktionieren.

Um den folgenden Fehler zu vermeiden, kopieren Sie einfach "C: \ Windows \ System32" in die PATH-Umgebungsvariable und schließen Sie die aktuelle aktive Eingabeaufforderung und öffnen Sie es einmal. (Falls nicht, versuchen Sie noch einmal zu booten)

Fehler: cmd: Befehl fehlgeschlagen mit Exit Code ENOENT.

Verwandte Themen