问题
I am using Jenkins for continuous integration of android apps on mac.But i am unable to generate .apk file with Jenkins same as we create .ipa in iOS apps.what will be the configuration to create .apk file for distribution on mac.
回答1:
You can generate both release and debug builds in jenkins. For that, please follow the below procedure.
- Launch the job/project configuration screen by clicking on configure button which is available left side panel of job/project dashboard.
- Scroll down to see the Build section.
- Click on "Add Build step" button to see the drop down list.
- Click on "Invoke Ant" item in that and do like same available in attached screen shot.
- Save these modifications by clicking on save button when you have completely done the 4th step above.
- Click on Build Now button which is available at top left side panel.
- Now you have got the builds in your jenkins workspace.
Ex: In my case, builds are generated in the below path.
C:\Program Files (x86)\Jenkins\workspace\JOB_NAME\bin
You can also see the builds on Job dashboard by enabling the artifacts like below.
- Scroll down to see the Post-build Actions section.
- Click on "Add post-build action" button to see the drop down list.
- Click on "Archive the artifacts", and this will add one item in Post build actions section.
- Give the path and extension of which files you need to display in artifacts section of dashboard.
Ex: /bin/*.apk - to display all the apk files available in bin folder of that job.
来源:https://stackoverflow.com/questions/21570038/generating-android-build-with-jenkins-creating-apk-files