我下载了sdk-tools linux-3859397.zip并将其解压缩到/opt/android(这是我ANDROID_HOME(
因此,当我启动aapt时,它无法加载libc ++共享库
$ /opt/android/build-tools/27.0.3/aapt
/opt/android/build-tools/27.0.3/aapt: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
但是libc++是存在的,例如ldd工具已经找到了它!
$ ldd /opt/android/build-tools/27.0.3/aapt
linux-vdso.so.1 (0x00007ffdd66b3000)
libc++.so => /opt/android/build-tools/27.0.3/lib64/libc++.so (0x00007fc511580000)
librt.so.1 => /usr/lib64/librt.so.1 (0x00007fc511378000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007fc511170000)
libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007fc510f50000)
libz.so.1 => /usr/lib64/libz.so.1 (0x00007fc510d38000)
libm.so.6 => /usr/lib64/libm.so.6 (0x00007fc5109e0000)
libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007fc5107c8000)
libc.so.6 => /usr/lib64/libc.so.6 (0x00007fc5103e0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc511698000)
$ file /opt/android/build-tools/27.0.3/lib64/libc++.so
/opt/android/build-tools/27.0.3/lib64/libc++.so: setgid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
我尝试在 32 位和 64 位中安装 libstdc++-devel 但不能解决此问题
感谢您的帮助
注意:aapt2 存在相同的问题
[已解决]将 libc++.so 文件复制到/lib/后。问题已解决。
sravan@host3933:/lib$ ls -al |grep libc++
-rwxr-xr-x 1 根根根 5584312 8 月 20 日 17:41 libc++.so
sravan@host3933:/lib$ aapt -help
错误:未知命令"-help">
安卓资产打包工具
用法: aapt l[ist] [-v] [-a] 文件。{zip,jar,apk} 列出与 Zip 兼容的存档的内容。