本文主要是介绍zipalign安卓优化工具安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.下载
地址:https://developer.android.google.cn/studio,拉到最下面找到
Command line tools only
下载Linux版Command line tools
2.安装
-
将安装包
commandlinetools-linux-9477386_latest.zip
上传至服务器/usr/local/src
下 -
解压并进入
unzip commandlinetools-linux-9477386_latest.zip # 解压压缩包 cd cmdline-tools # 解压以后的文件名字为cmdline-tools mkdir latest # 创建latest【安装优化工具是必须有此文件夹】 mv !(latest) latest # 将cmdline-tools里所有文件都移动到latest里
-
安装构建优化工具
cd /usr/local/src/cmdline-tools/bin./sdkmanager --install "build-tools;31.0.0" //安装想要的工具
-
安装以后
build-tools
会在cmdline-tools
的同级目录下目录展示
[root@localhost 31.0.0]# pwd /usr/local/src/build-tools/31.0.0[root@localhost 31.0.0]# ll total 23712 -rwxr-xr-x 1 root root 1573784 Feb 20 17:30 aapt -rwxr-xr-x 1 root root 6039328 Feb 20 17:30 aapt2 -rw-r--r-- 1 root root 343 Feb 20 17:30 aarch64-linux-android-ld -rwxr-xr-x 1 root root 4904768 Feb 20 17:30 aidl -rwxr-xr-x 1 root root 2959 Feb 20 17:30 apksigner -rw-r--r-- 1 root root 343 Feb 20 17:30 arm-linux-androideabi-ld -rwxr-xr-x 1 root root 38712 Feb 20 17:30 bcc_compat -rw-r--r-- 1 root root 18159 Feb 20 17:30 core-lambda-stubs.jar -rwxr-xr-x 1 root root 2598 Feb 20 17:30 d8 -rwxr-xr-x 1 root root 7951520 Feb 20 17:30 dexdump -rw-r--r-- 1 root root 343 Feb 20 17:30 i686-linux-android-ld drwxr-xr-x 2 root root 4096 Feb 20 17:30 lib drwxr-xr-x 2 root root 4096 Feb 20 17:30 lib64 -rwxr-xr-x 1 root root 647 Feb 20 17:30 lld drwxr-xr-x 2 root root 4096 Feb 20 17:30 lld-bin -rwxr-xr-x 1 root root 1088832 Feb 20 17:30 llvm-rs-cc -rwxr-xr-x 1 root root 4732 Feb 20 17:30 mainDexClasses -rw-r--r-- 1 root root 310 Feb 20 17:30 mainDexClassesNoAapt.rules -rw-r--r-- 1 root root 758 Feb 20 17:30 mainDexClasses.rules -rw-r--r-- 1 root root 343 Feb 20 17:30 mipsel-linux-android-ld -rw-r--r-- 1 root root 766444 Feb 20 17:30 NOTICE.txt -rw-r--r-- 1 root root 18339 Feb 20 17:30 package.xml drwxr-xr-x 5 root root 4096 Feb 20 17:30 renderscript -rw-r--r-- 1 root root 17 Feb 20 17:30 runtime.properties -rw-r--r-- 1 root root 63 Feb 20 17:30 source.properties -rwxr-xr-x 1 root root 1533904 Feb 20 17:30 split-select -rw-r--r-- 1 root root 343 Feb 20 17:30 x86_64-linux-android-ld -rwxr-xr-x 1 root root 248360 Feb 20 17:30 zipalign
-
添加环境变量
ln -sf/usr/local/src/build-tools/31.0.0/zipalign /usr/local/bin/zipalign
这篇关于zipalign安卓优化工具安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!