问题描述
我正在尝试构建 android 应用程序.当我运行 zip align 工具来优化 APK 时,我收到此错误消息:
I am trying to build android app. When I run the zip align tool to optimize the APK, I get this error message:
zipalign: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
我尝试安装 libc++
I tried to install libc++
sudo aptitude install libc++
它说:找不到包libc+".
it says: Couldn't find package "libc+".
我的终端快照
推荐答案
如果你的系统是64位的,
If your system is 64-bits, there should be a folder lib64 on the path of
[android-path]/build-tools/[version]/
lib64 中的文件是
The files in lib64 are
[ec2-user 25.0.2]$ ll lib64/
total 51628
-rwxrwxrwx 1 ec2-user ec2-user 30712616 Dec 23 07:22 libLLVM.so
-rwxrwxrwx 1 ec2-user ec2-user 482522 Dec 23 07:22 libbcc.so
-rwxrwxrwx 1 ec2-user ec2-user 433914 Dec 23 07:22 libbcinfo.so
-rwxrwxrwx 1 ec2-user ec2-user 1211614 Dec 23 07:22 libc++.so
-rwxrwxrwx 1 ec2-user ec2-user 20019608 Dec 23 07:22 libclang.so
只需将文件夹lib64和zipalign程序一起复制到目标路径,即可正确运行zipalign.
它对我有用.我猜 zipalign 依赖于 lib64 文件夹中的文件.
Just copy the folder lib64 and zipalign program together to the destination path, and you can run the zipalign correctly.
It worked for me. I guess the zipalign has a dependency on the files in lib64 folder.
这篇关于zipalign:加载共享库时出错:libc++.so:无法打开共享对象文件:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!