Jenkins自动编译常见问题汇总(持续更新)

来源:互联网 发布:js 在线编辑器 w3c 编辑:程序博客网 时间:2024/06/12 01:43

Jenkins编译log如下(说是Android sdk路径不存在导致的编译失败);

Triggered by Gerrit: http://developer.miivii.com:8081/231[EnvInject] - Loading node environment variables.Building in workspace /home/jenkins/workspace/Alaska/MVLauncher2 > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url ssh://developer.miivii.com:29418/miivii-sw-android/sdk_v2/apps/MVLauncher2 # timeout=10Fetching upstream changes from ssh://developer.miivii.com:29418/miivii-sw-android/sdk_v2/apps/MVLauncher2 > git --version # timeout=10 > git fetch --tags --progress ssh://developer.miivii.com:29418/miivii-sw-android/sdk_v2/apps/MVLauncher2 refs/changes/*:refs/changes/* > git rev-parse refs/changes/31/231/2^{commit} # timeout=10 > git rev-parse refs/remotes/origin/refs/changes/31/231/2^{commit} # timeout=10Checking out Revision 53bfb46d3162bd7418e83bd5c8fdc1040cbcd705 (refs/changes/31/231/2) > git config core.sparsecheckout # timeout=10 > git checkout -f 53bfb46d3162bd7418e83bd5c8fdc1040cbcd705First time build. Skipping changelog.[MVLauncher2] $ /bin/sh -xe /tmp/hudson5326600375543782905.sh+ ./gradlew assembleTo honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html.useNewCruncher has been deprecated. It will be removed in a future version of the gradle plugin. New cruncher is now always enabled.FAILURE: Build failed with an exception.* What went wrong:A problem occurred configuring project ':app'.> The SDK directory '/home/zlliu/android-sdk-linux' does not exist.* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILEDTotal time: 2.71 secsBuild step 'Execute shell' marked build as failureSkipped archiving because build is not successfulFinished: FAILURE

解决方案就是删除掉不该push到服务器的文件:

导致我问题的是local.properties文件,删除以后就编译通过了。

当然如果push了其他不该push的文件,又会暴露出其他的编译失败原因,解决办法一样:

git rm local.properties删除

rm -rf .idea/删除

然后再push。


截图:


0 0
原创粉丝点击