1、解压软件包html
[root@webLogic-15 script]# ll 总用量 9260 -rw-r--r--. 1 root root 9479625 12月 4 14:54 platform-tools_r08-linux.zip [root@webLogic-15 script]# unzip platform-tools_r08-linux.zip Archive: platform-tools_r08-linux.zip inflating: platform-tools/NOTICE.txt inflating: platform-tools/aapt inflating: platform-tools/adb inflating: platform-tools/aidl inflating: platform-tools/dexdump inflating: platform-tools/dx creating: platform-tools/lib/ inflating: platform-tools/lib/dx.jar inflating: platform-tools/llvm-rs-cc extracting: platform-tools/source.properties [root@webLogic-15 script]# ll 总用量 9264 drwxr-xr-x. 3 root root 4096 12月 4 14:54 platform-tools -rw-r--r--. 1 root root 9479625 12月 4 14:54 platform-tools_r08-linux.zip [root@webLogic-15 script]# cd platform-tools [root@webLogic-15 platform-tools]# ll 总用量 19472 -rwxrwxrwx. 1 root root 807252 10月 13 2011 aapt -rwxrwxrwx. 1 root root 159620 10月 13 2011 adb -rwxrwxrwx. 1 root root 164312 10月 13 2011 aidl -rwxrwxrwx. 1 root root 368717 10月 13 2011 dexdump -rwxrwxr-x. 1 root root 2603 10月 13 2011 dx drwxrwx---. 2 root root 4096 10月 13 2011 lib -rwxrwxrwx. 1 root root 18043680 10月 13 2011 llvm-rs-cc -rw-rw----. 1 root root 366627 10月 13 2011 NOTICE.txt -rw-rw-rw-. 1 root root 32 10月 13 2011 source.properties
2、执行aapt命令,报以下错误:linux
[root@webLogic-15 platform-tools]# ./aapt ./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
解决该错误方法:c++
[root@webLogic-15 platform-tools]# yum install zlib-1.2.3-29.el6.i686 --setopt=protected_multilib=false
3、再次执行aapt命令,仍是报错
web
[root@webLogic-15 platform-tools]# ./aapt --help ./aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
查看哪一个安装包包含该库文件:app
[root@webLogic-15 platform-tools]#yum whatprovides libstdc++.so.6 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.163.com libstdc++-4.4.7-4.el6.i686 : GNU Standard C++ Library Repo : base Matched from: Other : libstdc++.so.6
安装libstdc++-4.4.7-4.el6.i686包ide
[root@webLogic-15 platform-tools]# yum -y install libstdc++-4.4.7-4.el6.i686 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.163.com ... ... Error: Protected multilib versions: libstdc++-4.4.7-4.el6.i686 != libstdc++-4.4.6-4.el6.x86_64 You could try using --skip-broken to work around the problem ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows: zlib-1.2.3-29.el6.i686 is a duplicate with zlib-1.2.3-27.el6.x86_64
执行如下命令,解决库冲突问题:
spa
[root@webLogic-15 platform-tools]# yum -y install libstdc++-4.4.7-4.el6.i686 --setopt=protected_multilib=false Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.163.com Setting up Install Process .... .... Installed: libstdc++.i686 0:4.4.7-4.el6 Dependency Installed: libgcc.i686 0:4.4.7-4.el6 Dependency Updated: libgcc.x86_64 0:4.4.7-4.el6 Complete!
4、再次执行aapt命令,查看问题是否解决orm
[root@webLogic-15 platform-tools]# ./aapt --help ERROR: Unknown command '--help' Android Asset Packaging Tool Usage: aapt l[ist] [-v] [-a] file.{zip,jar,apk} List contents of Zip-compatible archive. aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]] badging Print the label and icon for the app declared in APK. permissions Print the permissions from the APK. resources Print the resource table from the APK. configurations Print the configurations in the APK. xmltree Print the compiled xmls in the given assets. xmlstrings Print the strings of the given compiled xml assets. 。。。 。。。
至此,问题获得解决!xml