" java的:包org.apache.cordova不存在" Android Studio中compliling科尔多瓦时不存在、科尔、多瓦、org

2023-09-08 09:52:41 作者:难抉择

新的Andr​​oid开发人员的世界,我刚刚在这里开始,也想反正。我已经下载科尔多瓦(2.8,可能需要升级这一点),Java的JDK(1.7),以及全新的Andr​​oid工作室,安卓SDK,安装了所有与4.x的软件包,并安装蚂蚁(1.9.2)。

New to android dev world and am just getting started here, well trying to anyway. I've downloaded Cordova (2.8, might need to upgrade this), Java JDK (1.7), and the new Android Studio, the Andriod SDK, installed all the 4.x packages with that, and installed ant (1.9.2).

似乎一切都尽可能的去合作。问题是,当我可以创建一个科尔多瓦项目,在命令行中,使用导入功能,不扭捏什么在Studio加载它,只是接受(因为我读一些博客这样做在那里),一切似乎加载OK该项目是有在Studio,直到我尽量做到。在这一点上,我得到的和错误的java:包org.apache.cordova不存在其次是其他几个错误,我觉得可能是相关的。我不是我也不是想在这里做什么特别的,只是获得股票和运行。

Everything seems to be working as far as that goes. Problem is when I can create a Cordova project, from the command line, load it up in Studio using the import feature, not tweaking anything, just accepting (as I read to do so on some blog out there) and everything seems to load ok and the project is there in Studio, until I try to make it. At this point, I get and error "java: package org.apache.cordova does not exist" This is followed by several other errors, which I feel may be related. I'm not nor am I trying to do anything fancy here, just get the stock up and running.

任何人都知道我缺少的是什么?我需要的地方复制文件或编译额外的东西?还是我用的什么版本不对?谢谢!

Anybody know what I'm missing? Do I need to copy a file somewhere or compile something extra? Or am I using the wrong version of something? Thanks!

推荐答案

我发现搜索和反复试验(虽然大多是错误)小时后,我来到了发现这一切都是由于缺少科尔多瓦 - *。jar文件。这需要使用蚂蚁的jar 在我的Andr​​oid科尔多瓦目录的框架文件夹中建立。这一步已majorly留下一吨的文件出来。一旦建成,我简单地复制这个到库我的项目,一切都装起来的文件夹,然后跑了,虽然我确实得到了有关从编译器pciated项目去$ P $警告,创建一个Ant构建并选择外部编译修正了这个警告。

I found after hours of searching and trial and error (although mostly errors) I came to find that it was all due to missing the cordova-*.jar file. which needed to be built using the ant jar in the framework folder of my android cordova directory. This step had been majorly left out of a ton of documentation. Once built, I simply copied this into the 'libs' folder of my project and everything loaded up and ran, although I did get a warning about depreciated project from the compiler, creating an ant build and selecting 'external compiler' fixed this warning.