如何找到cordova.jar在最新版本的phonegap 2.9.1? [英] how to find cordova.jar in latest version of phonegap 2.9.1?
问题描述
我下载最新版本phonegap-2.9.1 zip文件,但它不包含cordova.jar和当我在google上搜索我得到了答案像导航文件夹到lib / android /框架目录和火命令
android更新项目-p。 -t android-17
then
ant jar
I download latest version phonegap-2.9.1 zip file but it not contain cordova.jar and when i search on google the i got on answer like navigate folder to lib/android/framework directory and fire command
android update project -p . -t android-17
then
ant jar
但不工作。请任何人告诉我如何从phonegap-2.9.1找到cordova.jar。
but not working. please anybody tell me how to find cordova.jar from phonegap-2.9.1 .
推荐答案
首先,如果你已经玩了phonegap / cordova一段时间,你肯定会被覆盖)
First, you need the following requisites, for sure are covered if you have been playing with phonegap/cordova for a while ;)
- Java JDK 1.5或更高版本
- Apache ANT 1.8.0或更高版本
- Android SDK http://developer.android。 com
- Java JDK 1.5 or greater
- Apache ANT 1.8.0 or greater
- Android SDK http://developer.android.com
然后,生成 cordova-2.9.1.jar 文件,请按照以下步骤操作:
And then, to generate the cordova-2.9.1.jar file, follow the next steps:
-
下载并提取phonegap-2.9.1.zip 文件。
在terminal / cmd窗口进入最近提取的目录:
In a terminal/cmd window go inside the recently extracted directory:
$ cd phonegap-2.9.1\lib\android\framework\
$ cd phonegap-2.9.1\lib\android\framework\
执行以下命令(您需要在系统路径中配置android sdk和ant):
Execute the following commands (you need android sdk and ant already configured in your system path):
$ android更新项目-p。 -t android-17
$ android update project -p . -t android-17
如果需要,添加--subprojects参数:
If required add the --subprojects parameter:
$ android更新项目-p。 -t android-17 --subprojects
$ android update project -p . -t android-17 --subprojects
您会收到如下讯息:
更新了project.properties
更新了local.properties
build.xml:找到版本标记:custom。文件不会更新。
已更新文件D:\work_NEW\phonegap-2.9.1\lib\android\framework\proguard-project.txt
将default.properties更新并重命名为project.properties
更新local.properties
未指定项目名称,使用活动名称'DroidGap'。
如果要更改它,请编辑build.xml的第一行。
添加文件D:\work_NEW\phonegap-2.9.1\lib\android\framework\bin\build.xml
添加文件D:\work_NEW\phonegap- 2.9.1 \lib\android\framework\bin\proguard-project.txt
Updated project.properties Updated local.properties build.xml: Found version-tag: custom. File will not be updated. Updated file D:\work_NEW\phonegap-2.9.1\lib\android\framework\proguard-project.txt Updated and renamed default.properties to project.properties Updated local.properties No project name specified, using Activity name 'DroidGap'. If you wish to change it, edit the first line of build.xml. Added file D:\work_NEW\phonegap-2.9.1\lib\android\framework\bin\build.xml Added file D:\work_NEW\phonegap-2.9.1\lib\android\framework\bin\proguard-project.txt
最后执行:
$ ant jar
$ ant jar
Blablabla ....
:
[jar] Building jar:xxx\phonegap-2.9.1\lib\android\framework\cordova-2.9.1.jar
Blablabla.... jar: [jar] Building jar: xxx\phonegap-2.9.1\lib\android\framework\cordova-2.9.1.jar
BUILD SUCCESSFUL
总计时间:4秒
BUILD SUCCESSFUL Total time: 4 seconds
完成!文件准备好了!您可以在phonegap-2.9.1.zip文件中找到此信息和其他信息:
Done!!!!! The file is ready! And you can find this and other information reading a file inside the phonegap-2.9.1.zip:
phonegap-2.9.1\lib \android \README.md
这篇关于如何找到cordova.jar在最新版本的phonegap 2.9.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!