新的PhoneGap 3.0进口org.apache.cordova不能得到解决 [英] New PhoneGap 3.0 The import org.apache.cordova cannot be resolved

查看:141
本文介绍了新的PhoneGap 3.0进口org.apache.cordova不能得到解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了新手机的差距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开放的Andr​​oid项目我得到这个错误 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中导入的现有的Andr​​oid 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:

  1. 下载源邮政编码为科尔多瓦: http://cordova.apache.org/#download
  2. 解压缩科尔多瓦,机器人 ZIP任何地方。内将是一个框架的文件夹。
  3. 在Eclipse中打开新解压缩'科尔多瓦 - 机器人/框架 文件夹作为现有项目。
  4. 在Eclipse中右键单击这个新的科尔多瓦 项目 - >属性 - > Android版。确保'是图书馆进行检查。
  5. 右键点击您的应用程序的项目 - >属性 - > Android版。在 库部分中选择添加。选择您的科尔多瓦的项目。
  1. Download the source ZIP for Cordova: http://cordova.apache.org/#download
  2. Extract the 'cordova-android' ZIP anywhere. Inside will be a 'framework' folder.
  3. In eclipse open the newly unzipped 'cordova-android/framework' folder as an existing project.
  4. In eclipse right click on this new 'Cordova' project -> Properties -> Android . Make sure 'Is Library' is checked.
  5. 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屋!

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