Cordova Unable to add plugins (not the usual errors!)

I can begin with saying I’ve followed the “How-to”-guide step by step several times…
I’ve spent a good 6+ hours on installing and reinstalling all the packages to get ionic to work.
I’ve also googled like crazy and found many solutions to similar problems but not a single one seems to work for me.

The following are my specifications and a description on all solutions “out there” and I still cant make it work.
I’m using Windows 7 Professional 64bit.

My projects’ config.xml is empty, is this because the project couldn’t be initialized correctly?

Please help me, I was really looking forward to start playing with this (hopefully) awsome framework.

Thanks alot in advance!

C:\Users\Matte>ionic start test
Creating Ionic app in folder C:\Users\Matte\test based on tabs project

[=============================]  100%  0.0s

[=============================]  100%  0.0s

Update config.xml
Initializing cordova project
Unable to add plugins. Perhaps your version of Cordova is too old. Try updating
(npm install -g cordova), removing this project folder, and trying again. (CLI v
C:\Users\Matte>cordova -version >> 4.0.0
C:\Users\Matte>ionic -version >> 1.2.8
C:\Users\Matte>git --version >> 1.9.4.msysgit.2
C:\Users\Matte>npm -version >> 1.4.28
PATH for git,ant,npm,java,androidSDK are confirmed working.
Also added folder "C:\Users\Matte\AppData\Local\Temp\plugman\git"
C:\Users\Matte\test>cordova plugin add
Parsing C:\Users\Matte\test\config.xml failed
Error: Unexpected end
Line: 0
Column: 0
    at error (C:\Users\Matte\AppData\Roaming\npm\node_modules\cordova\node_modul
    at end (C:\Users\Matte\AppData\Roaming\npm\node_modules\cordova\node_modules
    at Object.write (C:\Users\Matte\AppData\Roaming\npm\node_modules\cordova\nod
    at Object.SAXParser.close (C:\Users\Matte\AppData\Roaming\npm\node_modules\c
    at XMLParser.close (C:\Users\Matte\AppData\Roaming\npm\node_modules\cordova\
    at ElementTree.parse (C:\Users\Matte\AppData\Roaming\npm\node_modules\cordov
    at Object.exports.XML (C:\Users\Matte\AppData\Roaming\npm\node_modules\cordo
    at Object.module.exports.parseElementtreeSync (C:\Users\Matte\AppData\Roamin
    at Object.ConfigParser (C:\Users\Matte\AppData\Roaming\npm\node_modules\cord
    at getScriptsFromConfigXml (C:\Users\Matte\AppData\Roaming\npm\node_modules\
C:\Users\Matte\test>ionic platform add android
Error updating C:\Users\Matte\test\config.xml: TypeError: Cannot read property '
widget' of null (CLI v1.2.8)
Buildfile: build.xml does not exist!
Build failed

I’m pretty sure I’ve looked throught the entire web for the solution of this problem and it is really frustrating.

The problem probably starts with the Ionic start command not working fully when Cordova tries to install plugins (and appears to be clearing the config.xml file in the process). Trying to run Cordova commands in a project without a valid config.xml file will fail.

Try putting the config.xml file back into your project from the base and then try to manually install Cordova plugins. If they continue to fail, you could try to downgrade Cordova to the 3.5.x version and see if that helps.

run the command android list target. If you see:

‘xcopy’ is not recognized as an internal or external command,
operable program or batch file.
at the beginning of the command output, it means you will need to fix your Windows Path variable to include xcopy. This location is typically under C:\Windows\System32.

The link:

Please try to add this:

Set Environment variable PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

Thanks both of you!
What solved my problem was manually adding the contents in the zip-archives to my projectfolder, however, since today (2 days after I started this) the archives are successfully downloaded and extracted automatically, so I’m suspecting the zip-archive to have been damaged, or similar.

Hi @mattemarklund
I have the same problem,
could you please tell me which files and where should I put them?.