注意:
a、AndroidSDK版本需和开发保持一致;
b、安卓常规使用gradle编译;
1、从git拉取打包分支代码
2、配置gradle打包命令
打包命令(Switches) :即gradle 后面所接的命令;下图相当于执行gradle assembleRelease命令。
3、将打出的APK包保存
4、配置打包后邮件发送
Editable Email Notification:注意需要添加Triggers,没有添加Triggers就不会发送通知邮件出来,这是一个触发条件。(主要添加的Triggers有三类:Failure-Any,Success,Unstable (Test Failures),分别对应构建失败,构建成功,构建不稳定时触发发送邮件通知)
5、常见问题:
1、编译报错(内存分配不足)
Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap
解决:在操作系统当前用户的.gradle文件夹下:C:\Users\Administrator\.gradle 新增gradle.properties文件,在文件中添加如下配置信息:org.gradle.jvmargs=-Xmx512m
2、编译报错(安卓SDK组件未匹配到)
You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26, Android SDK Build-Tools 26.0.2].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
解决:在Android SDK安装缺少的组件