CordovaError: Android SDK not found. - Jenkins

伤神 发布于 2016/03/23 10:09
阅读 1K+
收藏 0

用 Jenkins 对 Cordova 项目做持续集成,在 Jenkins 中执行 shell 脚本 cordova build 来对 cordova 项目进行构建。ANDROID_HOME 环境变量通过全局变量设置了,但是仍然报错;求大神帮忙~~~

CordovaError: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

环境变量设置如下

shell 脚本配置

详细错误信息如下:

CordovaError: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
    at /home/mac/workspace/cordova-hello/platforms/android/cordova/lib/check_reqs.js:45:27
    at ChildProcess.exithandler (child_process.js:220:5)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:827:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:475:12)

加载中
0
伤神
伤神
找到解决办法了,将 $ANDROID_HOME/tools 和 $ANDROID_HOME/platform-tools 配置到 jenkins 的全局环境变量里面,就可以了。
0
C
CookLinda

怎么配置啊?

返回顶部
顶部