sdk platform tools_一起学习-jenkins-gradleAndroid-sdk
Gradle3.3安装配置+ Android-sdk安装1、Gradle3.3下载并安装[root@jenkins ~]# lsgradle-3.3-all.zip jdk-8u144-linux-x64.gz[root@jenkins ~]# unzip gradle-3.3-all.zip[root@jenkins ~]# mv gradle-3.3 /etc/[root@jenkins ~]
Gradle3.3安装配置+ Android-sdk安装
1、Gradle3.3下载并安装
[root@jenkins ~]# ls
gradle-3.3-all.zip jdk-8u144-linux-x64.gz
[root@jenkins ~]# unzip gradle-3.3-all.zip
[root@jenkins ~]# mv gradle-3.3 /etc/
[root@jenkins ~]# cd /etc/gradle-3.3/
[root@jenkins gradle-3.3]# ls
bin docs getting-started.html init.d lib LICENSE media NOTICE samples src
配置环境变量
配置环境变量:
vi /etc/profile
export GRADLE_HOME=/etc/gradle-3.3 (gradle解压后的目录)
export PATH=$PATH:$GRADLE_HOME/bin
[root@jenkins gradle-3.3]# source /etc/profile
[root@jenkins gradle-3.3]# echo $GRADLE_HOME
/etc/gradle-3.3
2、Android-sdk下载并安装
root@jenkins sdk]# pwd
/data/sdk
配置环境变量:
vi /etc/profile
export ANDROID_HOME=/data/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
"/etc/profile" 86L, 2211C written
[root@jenkins sdk]# source /etc/profile
[root@jenkins sdk]# echo $ANDROID_HOME
/data/sdk
3、git安装配置
yum install curl curl-devel zlib-devel perl perl-devel gettext-devel expat-devel openssl-devel perl-ExtUtils-MakeMaker gettext-devel libcurl-devel ruby -y
yum install gcc gcc-g++ make libffi-devel openssl-devel.x86_64 python-devel vim curl-devel perl-ExtUtils-MakeMaker.x86_64 tcl tk gettext asciidoc xmlto -y
一般linux自带git版本很旧,会有一定问题,可以先卸载系统自带git:
yum remove git下载及安装git:tar zxvf git-2.7.2.tar.gzmv git-2.7.2/ gitmake configure./configure --prefix=/usr/local/git/ --with-iconv=/usr/local/libiconv --with-curl=/home/{username}/curl/
make all docmakemake installecho "export PATH=$PATH:/usr/local/git/bin" >> /etc/profilesource /etc/profile
==========================================================
[root@jenkins git]# git
usage: git [--version] [--help] [-C ] [-c name=value]
[--exec-path[=]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=] [--work-tree=] [--namespace=]
[]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
checkout Switch branches or restore working tree files
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
merge Join two or more development histories together
rebase Forward-port local commits to the updated upstream head
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help ' or 'git help '
to read about a specific subcommand or concept.
安装git遇到的问题
问题1:安装zlib、zlib-devel
In file included from credential-store.c:1:cache.h:21:18: warning: zlib.h: No such file or directoryIn file included from credential-store.c:1:cache.h:23: error: expected specifier-qualifier-list before 'z_stream'
make: *** [credential-store.o] Error 1
缺少 zlib的头文件, 开发包没装,
yum install zlib (系统默认已经装上)
yum install zlib-devel
问题2:
/bin/sh: autoreconf: command not found (centos 6.5 install qemu from source code)
# yum install install autoconf automake libtool
问题3:
报错make[1]: *** [perl.mak] Error 2
yum install perl-ExtUtils-MakeMaker package
问题4:
tclsh failed; using unoptimized loadingMSGFMT po/de.msg make[1]: *** [po/de.msg] Error 127
yum install tcl
问题5:
/bin/sh: msgfmt: command not foundmake: *** [po/build/locale/da/LC_MESSAGES/git.mo] Error 127
yum install gettext-devel
4、系统配置
系统管理-->Globl Tool Configuration,配置如下图:
jdk配置
gradle配置
添加git
更多推荐
所有评论(0)