如何建立从命令行Apache的科尔多瓦的项目? [英] How to build apache cordova project from command line?

查看:153
本文介绍了如何建立从命令行Apache的科尔多瓦的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 我已经安装的Apache科尔多瓦在我的Windows / Cygwin的平台。
  • 我可以使用命令创建项目 - 科尔多瓦创造< APP_NAME>
  • 我用命令加android平台 - 科尔多瓦平台添加的android
  • 我可以运行样本HTML / CSS / JS'使用科尔多瓦纹波的android
  • 我可以上传该项目build.phonegap并获得的.apk文件。
  • 我知道,从文档,我可以安装Eclipse和做的构建。 (我不是在寻找这一点)

  • 但使用命令科尔多瓦构建Android我不能创建的.apk文件。当我运行的命令,没有在命令行上输出,命令刚刚结束。我无法找到的.apk文件。

  
    

有没有一种方法,我可以创建命令行中的.apk文件?     (寻找其他平台的建议为好)

  

谢谢

解决方案

您应该获得更详细的输出通过运行科尔多瓦-d构建Android

另外,使用底层的科尔多瓦,Android的脚本来构建,您可以:

  CD平台/安卓
./cordova/build
 

或者,要剥去甚至更多层,你可以使用Android Ant脚本来运行构建(这是什么科​​尔多瓦脚本掏出来,反正):

  CD平台/安卓
蚂蚁调试
 

  • I've setup apache cordova on my Windows/Cygwin platform.
  • I can create project using the command - cordova create <app_name>.
  • I have added android platform using the command - cordova platform add android
  • I can run the sample 'html/css/js' using cordova ripple android.
  • I can upload the project to build.phonegap and get the .apk file.
  • I know from docs that I can setup eclipse and do the build. (I'm not looking for this)

  • But I cannot create .apk file using the command cordova build android. When I run the command, there is not output on the command line, the command just finishes. I cannot locate the .apk file.

Is there a way in which I can create an .apk file from command line? (Looking for suggestions for other platforms as well)

Thanks,

解决方案

You should get a more verbose output by running cordova -d build android.

Alternatively, to use the underlying cordova-android scripts to build, you can:

cd platforms/android
./cordova/build

OR, to peel away even more layers, you can use the Android ANT script to run the build (which is what the cordova scripts shell out to anyways):

cd platforms/android
ant debug

这篇关于如何建立从命令行Apache的科尔多瓦的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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