新的PhoneGap 3.0进口org.apache.cordova不能得到解决 [英] New PhoneGap 3.0 The import org.apache.cordova cannot be resolved
问题描述
我安装了新手机的差距3.0的所有强大的命令行。
I'm installing the new phone gap 3.0 with the all-mighty command line.
cordova create hello com.example.hello HelloWorld
cordova platform add android
当我在Eclipse开放的Android项目我得到这个错误 HelloWorld.java
:
When I open the android project in eclipse I get this error on HelloWorld.java
:
The import org.apache.cordova cannot be resolved
我想我有一个缺少库,但如何我解决这个问题,如果安装3.0的唯一方法被认为是命令行。
I guess I have a missing library but how to I solve this if the only way to install 3.0 is thought the command line.
推荐答案
更新:如果您升级到PhoneGap的3.3你不应该需要这样做了。 http://phonegap.com/blog/:关于更新的PhoneGap详细十二分之二千零一十三/ 13 / PhoneGap的发布/
Update: If you upgrade to Phonegap 3.3 you shouldn't need to do this anymore. Details on updating Phonegap: http://phonegap.com/blog/2013/12/13/phonegap-release/
注意:确保在Eclipse中导入的现有的Android code到工作区不会现有项目到工作区
Note: Make sure in eclipse you import Existing Android Code into Workspace NOT 'Existing Projects into Workspace
我有完全相同的问题,并找到了一个解决方案,它的工作原理:
I had the exact same problem and found a solution that works:
- 下载源邮政编码为科尔多瓦: http://cordova.apache.org/#download 李>
- 解压缩科尔多瓦,机器人 ZIP任何地方。内将是一个框架的文件夹。
- 在Eclipse中打开新解压缩'科尔多瓦 - 机器人/框架 文件夹作为现有项目。
- 在Eclipse中右键单击这个新的科尔多瓦 项目 - >属性 - > Android版。确保'是图书馆进行检查。
- 右键点击您的应用程序的项目 - >属性 - > Android版。在 库部分中选择添加。选择您的科尔多瓦的项目。
- Download the source ZIP for Cordova: http://cordova.apache.org/#download
- Extract the 'cordova-android' ZIP anywhere. Inside will be a 'framework' folder.
- In eclipse open the newly unzipped 'cordova-android/framework' folder as an existing project.
- In eclipse right click on this new 'Cordova' project -> Properties -> Android . Make sure 'Is Library' is checked.
- Right click on your app's project -> Properties -> Android. In the Library section choose 'Add'. Select your Cordova project.
全部完成,导入现在应该解决!
All done, import should now resolve!
这篇关于新的PhoneGap 3.0进口org.apache.cordova不能得到解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!