简体   繁体   中英

Jenkins Android Gradle Bild Fail

I'm start learning Jenkins for Android. I have setup Jenkins with Docker on my macosx. and start Jenkins using this command to create virtual path to my local AndroidSDK

docker run -p 8080:8080 -v /Users/foo/bar/Android/sdk:/var/android_home -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts

However, I cannot build project becuase google-service.json is missing from my git repository.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDevDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  /var/jenkins_home/workspace/Mappening Project/app/src/dev/debug/google-services.json
  /var/jenkins_home/workspace/Mappening Project/app/src/debug/dev/google-services.json
  /var/jenkins_home/workspace/Mappening Project/app/src/dev/google-services.json
  /var/jenkins_home/workspace/Mappening Project/app/src/debug/google-services.json
  /var/jenkins_home/workspace/Mappening Project/app/src/devDebug/google-services.json
  /var/jenkins_home/workspace/Mappening Project/app/google-services.json

The question is since google-service.json should not include in repository, what should be the solution ??

EDIT

I know the error, but don't want to include this file to remote repository and Jenkins connect to my remote repository to build, but without this file.

So, it's because of this file should not be on remote repository what should be the solution ???

您可以做的是将.json文件保留在macosx系统中,并且在构建过程中,一旦git pull完成,就可以将该文件复制到项目文件夹中。

I use this plugins in order to solved my requirement.

https://wiki.jenkins.io/display/JENKINS/Config+File+Provider+Plugin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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