NetBeans无法构建任何类型的Cordova项目。路径已经存在错误 [英] NetBeans can't build any type of Cordova project. Path already exists error

查看:413
本文介绍了NetBeans无法构建任何类型的Cordova项目。路径已经存在错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚得到了一个新的iMac(OSX Mavericks)并安装了最新的NetBeans 7.4 + Cordova + NodeJS + PhoneGap,并验证所有安装都正常,CLI命令正常工作。

I've just gotten a new iMac (OSX Mavericks) and installed the latest NetBeans 7.4 + Cordova + NodeJS + PhoneGap and verified that all installations went well and CLI commands are working properly.

我也安装和设置Android SDK和模拟器,这也很好,我在Netbeans中设置SDK路径。 Git也安装新鲜。

I also installed and setup the Android SDK and emulator and that works fine too and I setup the SDK path in Netbeans too. Git is also installed fresh.

但是,在NetBeans中,当我使用内置的Cordova模板(或者任何一个Cordova项目)启动一个新的Cordova项目,并尝试将它部署到任何Cordova模拟器(Android,iOS等),我一直收到同样的错误:

However, in NetBeans, when I start a new Cordova project with the built-in Cordova template (or ANY Cordova project for that matter) and try to deploy it on any Cordova emulator (Android, iOS, etc.), I keep getting the same error below:

cordova -d . create com.mego.TestCordova TestCordova 
Error: Path already exists and is not empty: /Users/wzeenni/Development/Projects/Prototypes/TestCordova 
Creating a new cordova project with name "TestCordova" and id "com.coolappz.TestCordova" at location "/Users/wzeenni/Development/Projects/Prototypes/TestCordova" 
    at CLI.create (/usr/local/lib/node_modules/cordova/src/create.js:63:25) 
    at new CLI (/usr/local/lib/node_modules/cordova/src/cli.js:105:30) 
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:16) 
    at Module._compile (module.js:456:26) 
    at Object.Module._extensions..js (module.js:474:10) 
    at Module.load (module.js:356:32) 
    at Function.Module._load (module.js:312:12) 
    at Function.Module.runMain (module.js:497:10) 
    at startup (node.js:119:16) 
    at node.js:901:3 
/Users/wzeenni/Development/Projects/Prototypes/TestCordova/nbproject/build.xml:78: exec returned: 1 
BUILD FAILED (total time: 1 second) 

当我右键单击项目>属性> Cordova>创建Cordova Resorces按钮时也会发生这种情况。它只是显示一个加载屏幕,然后给出相同的错误输出上面,我没有机会编辑任何值。

This also happens when I right-click the project > Properties > Cordova > Create Cordova Resorces button. It just shows me a loading screen then gives the same error output above and I don't get the chance to edit any values.

这真的令人沮丧,因为我没有更改我的默认NetBeans安装的任何设置,并尝试了不同的方法来使它工作,但没有效果。

This is really frustrating as I did not change any settings on my default NetBeans install and tried different ways to get it to work, but to no avail.

我甚至在我的Linux Mint框中尝试过,但我得到相同的错误消息。我知道路径已经存在是什么意思,但是我真的没有选择在NetBeans中改变任何东西。

I even tried this on my Linux Mint box, but I get the same error message. I know what "Path Already Exists" means, but I'm not really given a choice in NetBeans to change anything.

任何想法?有没有我需要安装的东西,我错过了?注意我还没有在Windows上试过这个。只是OSX Mavericks和Linux Mint。

Any ideas? Is there something I need to install that I missed? Note I have not tried this on Windows yet. Just OSX Mavericks and Linux Mint.

感谢任何帮助。

推荐答案

我猜你有Cordova 3.1.0-0.2.0? (运行cordova -v在命令行中找出)。似乎他们更改了0.2.0更新的内容,这与NetBeans不兼容。解决方法是卸载此版本并安装旧版本的Cordova:

I'm guessing you have Cordova 3.1.0-0.2.0? (run cordova -v in command line to find out). It seems like they changed something in the "0.2.0" update and this is not compatible with NetBeans. Workaround is to uninstall this version and install older version of Cordova instead:

sudo npm uninstall -g cordova
sudo npm install -g cordova@3.1.0-0.1.0

然后就可以了。我针对NetBeans报告了此问题,请参阅此处

And then it will work. I reported it against NetBeans, see here

这篇关于NetBeans无法构建任何类型的Cordova项目。路径已经存在错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆