使用aapt解析apk信息报错“cannot execute binary file”
来源:互联网 发布:破解八零网络验证 编辑:程序博客网 时间:2024/05/22 13:49
写了个工具类去解析APK包读取里面的信息,在window是环境测试都ok,但是部署到服务器(CentOS)就报错“cannot execute binary file”。
可能的解决方案:
1、如果是没有执行权限,用命令修改即可:chmod +x aapt
2、可能是编译环境不同造成的:请检查是不是因为 32位 64位操作系统导致或者是amd or intel问题导致;
3、如果还报如下错误
“aapt: /lib/libz.so.1: no version information available (required by aapt)”
解决如下:
查了一下,服务器上的libz版本太旧了(libz.so.1.2.3)导致的,下载一个新版本(zlib-1.2.7.tar.gz)即可。
a、tar zxvf zlib-1.2.7.tar.gz
b、./configure
c、make
d、make install 【确保用root用户,否则会提示Permission denied】
e、链接老版本 : ln -s /usr/local/lib/libz.so.1 /lib/libz.so.1【可能需要先删除原来的软连接】
4、如果还报如下错误
“error while loading shared libraries: libz.so.1: wrong ELF class: ELFCLASS64...”
换成32位的包,重新安装即可。【如果是64位机器的话,执行 export CFLAGS=-m32 ,然后在按步骤3即可】
5、如果上面的办法都不行:The solution that I found for this issue is to download the android sdk for linux,install it, and then grab the aapt file from the platform-tools folder and copy it over the aapt file in lib/android/bin.
参考文章:
http://forums.adobe.com/thread/934859
http://hi.baidu.com/whosafe/item/168890359c7fcc3a2f0f8179
http://www.bumao.com/
http://blog.csdn.net/hitlion2008/article/details/7451940#
http://7dot9.com/2012/12/centos-64%E4%BD%8D%E6%9C%BA%E5%99%A8%E9%85%8D%E7%BD%AEandroid-sdk%E5%92%8Cndk%E7%8E%AF%E5%A2%83/
- 使用aapt解析apk信息报错“cannot execute binary file”
- CentOS 报错cannot execute binary file
- 执行shell脚本报错 cannot execute binary file
- cannot execute binary file
- cannot execute binary file
- cannot execute binary file
- gcc不要使用-c参数,否则报-bash: ./mk_dia_ding3: cannot execute binary file
- linux 中安装JDK后执行java报错 :-bash: bin/java: cannot execute binary file
- error: cannot execute binary file
- cannot execute binary file处理
- linux - cannot execute binary file
- JAVA cannot execute binary file
- 【解决方案】Linux下aapt解析APK文件报错
- cygwin:as.exe: cannot execute binary file
- 请教 cannot execute binary file问题
- java: cannot execute binary file错误
- -bash: ./firstdrvtest: cannot execute binary file
- bash: ./java: cannot execute binary file 问题
- 动态规划之 装配线调度问题
- Webservice_26_SOAP的基于契约优先开发用户管理_通过Hander加入控制信息
- 【Android】requestDisallowInterceptTouchEvent
- SEO面向用户与搜索引擎
- ArcGIS Runtime SDK for iOS开发系列教程
- 使用aapt解析apk信息报错“cannot execute binary file”
- 成都传智播客java培训中心蔡老师ExtJS视频
- 【ArcGIS 10.2新特性】ArcGIS Online新特性(下)
- 实现邮箱找回的思路分析
- BENET4.0新添加第三学期“安全课程”(BENET3.0已经融在第二学期,但还没BENET4.0完整)
- 扩展长尾关键词的方法
- hdu(3308)LCIS
- NetBeans配置Android开发环境
- “Cache-control”常见的取值有private、no-cache、max-age、must-revalidate等