PhoneGap中文网

 找回密码
 立即注册
查看: 11218|回复: 1
打印 上一主题 下一主题

用ionic bulid android 编译apk出错

[复制链接]

1

主题

3

帖子

15

积分

新手上路

Rank: 1

积分
15
跳转到指定楼层
楼主
发表于 2015-9-9 23:18:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 新概念 于 2015-9-9 23:18 编辑
  1. $ ionic build android
  2. Running command: g:\SOFT\NODEJS\node.exe c:\Users\he\Desktop\myapp\myApp\hooks\a
  3. fter_prepare\010_add_platform_class.js c:/Users/he/Desktop/myapp/myApp
  4. add to body class: platform-android
  5. Running command: cmd "/s /c "c:\Users\he\Desktop\myapp\myApp\platforms\android\c
  6. ordova\build.bat""
  7. ANDROID_HOME=E:\soft\adt-bundle-windows-x86_64-20140702\sdk
  8. JAVA_HOME=C:\Program Files\Java\jdk1.8.0_11
  9. Running: c:\Users\he\Desktop\myapp\myApp\platforms\android\gradlew cdvBuildDebug
  10. -b c:\Users\he\Desktop\myapp\myApp\platforms\android\build.gradle -Dorg.gradle.
  11. daemon=true


  12. BUILD FAILED

  13. Total time: 13.755 secs
  14. FAILURE: Build failed with an exception.

  15. * Where:
  16. Script 'C:\Users\he\Desktop\myapp\myApp\platforms\android\cordovaLib\cordova.gra
  17. dle' line: 64

  18. * What went wrong:
  19. A problem occurred evaluating root project 'android'.
  20. > No installed build tools found. Please install the Android build tools version
  21. 19.1.0 or higher.

  22. * Try:
  23. Run with --stacktrace option to get the stack trace. Run with --info or --debug
  24. option to get more log output.

  25. c:\Users\he\Desktop\myapp\myApp\platforms\android\cordova\node_modules\q\q.js:12
  26. 6
  27.                     throw e;
  28.                           ^
  29. Error code 1 for command: cmd with args: /s /c "c:\Users\he\Desktop\myapp\myApp\
  30. platforms\android\gradlew cdvBuildDebug -b c:\Users\he\Desktop\myapp\myApp\platf
  31. orms\android\build.gradle -Dorg.gradle.daemon=true"
  32. ERROR building one of the platforms: Error: cmd: Command failed with exit code 1

  33. You may not have the required environment or OS to build this project
  34. Error: cmd: Command failed with exit code 1
  35.     at ChildProcess.whenDone (c:\Users\he\AppData\Roaming\npm\node_modules\cordo
  36. va\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
  37.     at ChildProcess.emit (events.js:110:17)
  38.     at maybeClose (child_process.js:1015:16)
  39.     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

  40. he@LIAN ~/Desktop/myapp/myApp
复制代码
环境已经安装成功,可以用ionic serve能运行成功,用浏览器打开没问题,可以用eclipse打开并编译成功安装到手机运行,唯独不能用命令行编译。求解。。。。。。。
回复

使用道具 举报

52

主题

528

帖子

1652

积分

金牌会员

Rank: 6Rank: 6

积分
1652
沙发
发表于 2015-9-10 09:00:35 | 只看该作者
25和26行左右代码看看  build tools  19.1.0 or higher 意思就是升级一下  build tools

http://bbs.phonegap100.com/thread-1787-1-1.html 升级离线包下载地址
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2025-1-4 19:13 , Processed in 0.040807 second(s), 32 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表