在Linux下使用gradle自动打包
作者:网络转载 发布时间:[ 2016/7/8 10:17:49 ] 推荐标签:操作系统 Linux
一、下载软件包
1、下载地址
wget https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
wget http://services.gradle.org/distributions/gradle-2.12-bin.zip
二、安装
1、java
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo update-alternatives --config java
sudo update-alternatives --config javac
2、Android sdk
./android list sdk
查看源
Refresh Sources:
Fetching https://dl.google.com/android/repository/addons_list-2.xml
Validate XML
Parse XML
Fetched Add-ons List successfully
Refresh Sources
Fetching URL: https://dl.google.com/android/repository/repository-11.xml
Validate XML: https://dl.google.com/android/repository/repository-11.xml
Parse XML: https://dl.google.com/android/repository/repository-11.xml
Fetching URL: https://dl.google.com/android/repository/addon.xml
Validate XML: https://dl.google.com/android/repository/addon.xml
Parse XML: https://dl.google.com/android/repository/addon.xml
Fetching URL: https://dl.google.com/android/repository/glass/addon.xml
Validate XML: https://dl.google.com/android/repository/glass/addon.xml
Parse XML: https://dl.google.com/android/repository/glass/addon.xml
Fetching URL: https://dl.google.com/android/repository/extras/intel/addon.xml
Validate XML: https://dl.google.com/android/repository/extras/intel/addon.xml
Parse XML: https://dl.google.com/android/repository/extras/intel/addon.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Packages available for installation or update: 22
1- SDK Platform Android 4.4.2, API 19, revision 4
2- SDK Platform Android 4.3.1, API 18, revision 3
3- SDK Platform Android 4.2.2, API 17, revision 3
4- SDK Platform Android 4.1.2, API 16, revision 5
5- SDK Platform Android 4.0.3, API 15, revision 5
6- Google APIs, Android API 23, revision 1
7- Google APIs, Android API 22, revision 1
8- Google APIs, Android API 21, revision 1
9- Google APIs, Android API 19, revision 20
10- Glass Development Kit Preview, Android API 19, revision 11
11- Google APIs, Android API 18, revision 4
12- Google APIs, Android API 17, revision 4
13- Google APIs, Android API 16, revision 4
14- Google APIs, Android API 15, revision 3
15- GPU Debugging tools, revision 3.1
16- GPU Debugging tools, revision 1.0.3
17- Android Auto Desktop Head Unit emulator, revision 1.1
18- Google Play APK Expansion library, revision 1
19- Google Play Licensing Library, revision 1
20- Google Play Billing Library, revision 5
21- Android Auto API Simulators, revision 1
22- Google Web Driver, revision 2
根据需要进行安装
./android update sdk --no-ui --filter 1,31,tool,platform-tool
如果google很慢,可以改hosts
74.125.237.1 dl-ssl.google.com
3、gradle
加入环境变量
export PATH=/mnt/javasrc/gradle-2.12/bin:/mnt/javasrc/android-sdk-linux:$PATH
三、编译测试
gradle assRelease
gradle clean
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11