简体   繁体   English

如何构建Android应用程序cordova

[英]how to build android app cordova

i've been trying to build a cordova / android app this afternoon but i did not succeed ... 我一直在尝试今天下午构建一个cordova / android应用程序,但是我没有成功...

I created my project by the usual way : 'cordova create [NAME]' 我以通常的方式创建了我的项目:“ cordova创建[NAME]”

i followed all the steps i could have found and even more, documentation, some post on SO .. So, i did install cordova using node Js, i installed java JDK and set the JAVE_HOME, same with ant, i did install the adnroid SDK and set it into the PATH, installed the build tool .. when i'm trying to do this command : 'cordova platform add android -d', it gives me a huge error which is : 我遵循了所有可能已经找到的步骤,甚至完成了文档,在SO上写了一些帖子。并将其设置为PATH,安装了构建工具..当我尝试执行以下命令时:“ cordova platform add android -d”,它给了我一个巨大的错误,它是:

Requesting {"uri":" https://git-wip-us.apache.org/repos/asf?p=cordova-android.git ;a=snapshot;h=3.1.0;sf=tgz"}... Downloaded, unzipped and extracted 506952 byte response. 请求{“ uri”:“ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git ; a = snapshot; h = 3.1.0; sf = tgz”}。下载,解压缩并提取506952字节响应。 Checking if platform "android" passes minimum requirements... Checking Android requirements... Running "android list target" (output to follow) Available Android targets: 正在检查平台“ android”是否通过最低要求...正在检查Android要求...正在运行“ android list target”(跟随输出)可用的Android目标:

id: 1 or "android-14"
 Name: Android 4.0
 Type: Platform
 API level: 14
 Revision: 3
 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W
XGA720, WXGA800
 ABIs : armeabi-v7a

id: 2 or "Google Inc.:Google APIs:14"
 Name: Google APIs
 Type: Add-On
 Vendor: Google Inc.
 Revision: 2
 Description: Android + Google APIs
 Based on Android 4.0 (API level 14)
 Libraries:
  * com.android.future.usb.accessory (usb.jar)
      API for USB Accessories
  * com.google.android.maps (maps.jar)
      API for Google Maps
 Skins: WVGA854, WQVGA400, WSVGA, WXGA720, HVGA, WQVGA432, WVGA800 (default)
, QVGA, WXGA800
 ABIs : armeabi-v7a

id: 3 or "android-17"
 Name: Android 4.2.2
 Type: Platform
 API level: 17
 Revision: 2
 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W
 XGA720, WXGA800, WXGA800-7in
 ABIs : armeabi-v7a, mips, x86

 id: 4 or "Google Inc.:Google APIs:17"
 Name: Google APIs
 Type: Add-On
 Vendor: Google Inc.
 Revision: 3
 Description: Android + Google APIs
 Based on Android 4.2.2 (API level 17)
 Libraries:
  * com.google.android.media.effects (effects.jar)
      Collection of video effects
  * com.android.future.usb.accessory (usb.jar)
      API for USB Accessories
  * com.google.android.maps (maps.jar)
      API for Google Maps
 Skins: WVGA854, WQVGA400, WSVGA, WXGA800-7in, WXGA720, HVGA, WQVGA432, WVGA
 800 (default), QVGA, WXGA800
 ABIs : armeabi-v7a

 Running "android update project -p "C:\Users\T234106\.cordova\lib\android\cordov
 a\3.1.0\framework" -t android-17" (output to follow)...
 Updated project.properties
 Updated local.properties
 build.xml: Found version-tag: custom. File will not be updated.
 Added file C:\Users\T234106\.cordova\lib\android\cordova\3.1.0\framework\proguar
 d     -project.txt

 Running bin/create for platform "android" with command: ""C:\Users\T234106\.cord
 ova\lib\android\cordova\3.1.0\bin\create"  "C:\Users\T234106\RippleSites\MR\plat
 forms\android" "io.cordova.hellocordova" "MondialRelay"" (output to follow)
 Creating Cordova project for the Android platform:
 Command failed to execute : ant jar

 Error: An error occured during creation of android sub-project. Creating Cordova
  project for the Android platform:
 Command failed to execute : ant jar

I also tried to remove the .cordova folder that is into my User folder .. 我还尝试删除了我的用户文件夹..中的.cordova文件夹。

If someone could just take few minutes to help me out .. ;) thank you ! 如果有人可以花几分钟帮助我..;)谢谢!

它是执行蚂蚁罐子时的权限问题吗?

which version of ant you have. 您拥有哪个版本的蚂蚁。 Cordova 3.3 demands 1.8.0. Cordova 3.3要求1.8.0。 Also, Please check again your path, is it pointing correctly to this new version of Ant? 另外,请再次检查您的路径,它是否正确指向此新版本的Ant? If any duplication/reference to lower version of ant to some where else remove it from path. 如果对其他较低版本的ant有任何重复/引用,请从路径中将其删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM