在Linux下使用gradle自动打包
来源:互联网 发布:mac桌面出现ds store 编辑:程序博客网 时间:2024/05/16 10:30
原文:http://www.cnblogs.com/chenpingzhao/archive/2016/07/07/5651347.html
一、下载软件包
1、下载地址
1
2
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
1
2
3
4
5
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
1
.
/android
list sdk
查看源
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
根据需要进行安装
1
.
/android
update sdk --no-ui --filter 1,31,tool,platform-tool
如果google很慢,可以改hosts
1
74.125.237.1 dl-ssl.google.com
3、gradle
加入环境变量
1
export
PATH=
/mnt/javasrc/gradle-2
.12
/bin
:
/mnt/javasrc/android-sdk-linux
:$PATH
三、编译测试
1
2
gradle assRelease
gradle clean
0 0
- 在Linux下使用gradle自动打包
- Android Studio使用Gradle多渠道自动打包
- gradle自动打包
- gradle自动打包混淆
- Gradle使用技巧1——根据buildType自动打包
- Android——使用gradle进行多渠道自动打包
- Gradle 自动打包JAR文件
- Jenkins + gradle 自动打包jar
- 在eclipse下用gradle打包的经验总结!
- 使用Gradle打包apk
- gradle打包的使用
- 使用gradle多渠道打包
- Eclipse下Gradle使用不同资源打包多版本应用
- Android Studio 使用Gradle在Terminal终端用命令打包
- 在mac上使用gradle命令行打包apk
- windows 下 android 使用ant自动打包
- windows 下 android 使用ant自动打包
- 【Android】使用Jenkins+Gradle+FTP,实现自动打包,自动上传文件至FTP
- 陆辰妮
- 多元线性回归的python实现
- JavaScript typeof() 这个函数是干什么用的?有几个参数,每个参数代表什么?
- RPC
- 如何使用CSS栅格布局创建一个简单页面布局
- 在Linux下使用gradle自动打包
- Spring Java ajaxfileupload.js 上传头像 3.0
- dwr WebContextFactory 工厂模式
- Hadoop2.7.3完全分布式集群搭建和测试
- 阿里巴巴73款开源产品全向图
- Class 与 Style 绑定内联样式(vue.js)
- 396. Rotate Function
- js/jquery常用方法(replaceALl、new Map()、点击th(表头)或拖动tr只前台排序)
- day35java基础