Cordova 蚂蚁罐不可用 [英] Cordova ant jar not available

查看:18
本文介绍了Cordova 蚂蚁罐不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从全新安装的 Cordova 3.3.0 和 PATH 修复,可查看工具等

Cordova 3.3.0 installed from fresh and PATH fixed with visibility to tools etc.

构建一个新的裸应用添加安卓平台

Build a new bare application Add android platform

现在开始出错了 -

按照导入到 Android 开发工具 (Eclipse) 的说明,我创建了两个项目HelloWorld 和 HelloWorld-CordovaLib

Following instructions to import to Android Development Tools ( Eclipse ) I get TWO projects created HelloWorld and HelloWorld-CordovaLib

HelloWorld 有错误,因为它看不到/没有cordova.jar 文件(根据过去的经验假设)

HelloWorld has errors as it can't see/does not have the the cordova.jar file ( assuming this from past experience )

HelloWorld-CordovaLibs 是 HelloWorld 项目中缺少的所有 Cordova 源

HelloWorld-CordovaLibs is whats missing from the HelloWorld project all the source to Cordova

假设我需要我挖掘的 jar 文件并尝试从我的项目的 android 部分运行 ant jar

Assuming that I need the jar file I dig around and try running ant jar from within the android part of my project

运行 ant jar 失败 -

Running ant jar fails -

HelloWorld"项目中不存在目标jar"

Target "jar" does no exist in the project "HelloWorld"

这是一个蚂蚁错误,告诉我它不知道如何构建目标 jar.

which is an ant error telling me it doesn't know how to build target jar.

查看 android 目录中的 build.xml 证实了这一点 - 没有关于jar"的部分在网络和 Apache Cordova git 存储库上进行更多挖掘似乎暗示我应该在定义了 jar 目标的框架"目录中包含另一个文件 build.xml.

look at build.xml in the android directory confirms this - no section on "jar" A bit more digging on the net and the Apache Cordova git repository seems to intimate that I should have another file build.xml inside a directory 'framework' with the jar target defined.

Ahhhhh - 任何地方都没有框架目录.

Ahhhhh - no framework directory anywhere.

在我撕掉更多头发之前,谁能弄清楚这一切出了什么问题?

Can anyone work out where this is all going wrong before I tear any more hair out?

推荐答案

我按照本指南创建了一个 Cordova 3.3.0 项目,将其导入 Eclipse,并在 Eclispe 的设备上成功运行:http://cordova.apache.org/docs/en/3.3.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide

I followed this guide to create a Cordova 3.3.0 project, import it into Eclipse, and successfully run it on a device from Eclispe: http://cordova.apache.org/docs/en/3.3.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide

你是对的,它导入了HelloWorld"和HelloWorld-CordovaLibs".这是因为 https://issues.apache.org/jira/browse/CB-5232,这使得 Android 现在出于各种原因使用 CordovaLib 而不是 .jar(请参阅错误报告.)您应该将两个项目导入 Eclipse(我将在文档中更改此设置).

You are right that it imports "HelloWorld" and "HelloWorld-CordovaLibs". This is because of https://issues.apache.org/jira/browse/CB-5232, which makes Android now use the CordovaLib instead of the .jar for a variety of reasons (see the bug report.) You should import both projects into Eclipse (I'll change this in the documentation).

如果您遵循该指南,您应该没问题.您不必再构建 .jar 了.

If you follow that guide you should be fine. You don't have to build a .jar anymore.

这篇关于Cordova 蚂蚁罐不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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