我下载了 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 相同的问题