[英]zipalign: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
I am trying to build android app. 我正在尝试构建Android应用程序。 When I run the zip align tool to optimize the APK, I get this error message:
当我运行zip对齐工具来优化APK时,我收到以下错误消息:
zipalign: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
I tried to install libc++ 我试着安装libc ++
sudo aptitude install libc++
it says: Couldn't find package "libc+". 它说:找不到包“libc +”。
Snapshot of my terminal 我终端的快照
If your system is 64-bits, there should be a folder lib64 on the path of 如果您的系统是64位,则路径上应该有一个文件夹lib64
[android-path]/build-tools/[version]/
The files in lib64 are lib64中的文件是
[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
Just copy the folder lib64 and zipalign program together to the destination path, and you can run the zipalign correctly. 只需将文件夹lib64和zipalign程序一起复制到目标路径,即可正确运行zipalign。
It worked for me. 它对我有用。 I guess the zipalign has a dependency on the files in lib64 folder.
我想zipalign依赖于lib64文件夹中的文件。
I met the same problems and google it. 我遇到了同样的问题并谷歌。 You can try the following suggestions:
您可以尝试以下建议:
I had the exact same problem and it was probably because I moved the zipalign
binary from <android-path>/build-tools/23.0.3
to <android-path>/tools
. 我有完全相同的问题,这可能是因为我将
zipalign
二进制文件从<android-path>/build-tools/23.0.3
到<android-path>/tools
。
The solution is to add the build-tools/23.0.3
dir to your path: 解决方案是将
build-tools/23.0.3
目录添加到您的路径:
export PATH=${PATH}:<android-path>/build-tools/23.0.3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.