【FAQ】Ubuntu环境下ant编译android代码问题
2023-09-11 14:21:32 时间
在Ubuntu14.04环境下,编译android程序时候,运行ant debug的时候出现如下异常:
[aapt] /opt/Android/adt-bundle-linux-x86_64-20140624/sdk/build-tools/android-4.4W/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
BUILD FAILED
/opt/Android/adt-bundle-linux-x86_64-20140624/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/opt/Android/adt-bundle-linux-x86_64-20140624/sdk/tools/ant/build.xml:698: null returned: 127
在/opt/Android/adt-bundle-linux-x86_64-20140624/sdk/tools/ant/build.xml 文件第 653 行,看到的信息是:
elseText="hasCode = false. Skipping aidl/renderscript/R.java">
在 /opt/Android/adt-bundle-linux-x86_64-20140624/sdk/tools/ant/build.xml 文件第 698行,看到的信息是:
proguardFile="${out.absolute.dir}/proguard.txt">
当前工程确实没有做混淆,但是在 /opt/Android/adt-bundle-linux-x86_64-20140624/sdk/build-tools/android-4.4W/ 目录下,却是有aapt文件的。后来找到解决办法,那就是:解决 lib32stdc++6 的错误问题,安装相应的包。
sudo apt-get install lib32stdc++6 sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
如果发生下面的问题,则再次更新:
sudo apt-get update --fix-missing
之后再次试验,可见已经正常,可以正确打包:
相关文章
- Android基础面试题
- 【Android 应用开发】 ActionBar 样式具体解释 -- 样式 主题 简单介绍 Actionbar 的 icon logo 标题 菜单样式改动
- 如何在Nexus上实现Ubuntu和Android 4.4.2 双启动
- 在 Linux 上将 BQ Aquaris Ubuntu 手机刷成 Android 系统
- android:layout_gravity="bottom"不起作用问题
- Android交流会-碎片Fragment,闲聊单位与尺寸
- android常见错误-The container 'Android Dependencies' references non existing library
- 在Ubuntu上为Android系统内置Java应用程序测试Application Frameworks层的硬件服务
- 在Ubuntu上下载、编译和安装Android最新源代码
- Android 实现书籍翻页效果----升级篇
- android studio出现 waiting for adb
- Android 串口通信基于licheedev和android-serialport两种方案实现附Demo
- Ubuntu 20.04编译Android 8.1
- Android BLE 快速开发示例
- Android Studio升级或更新项目,经常造访的“Could not find com.android.tools.build :gradle: x.x.x”的原因分析
- 3. Ubuntu系统中文化、安装中文输入法、解决VNC上ubuntu后无法复制粘贴问题
- 【AGC】通过AGC认证服务在Android平台实现匿名登录功能
- android-sdk-windows版本号下载
- 【Android Studio报错】:Failed to read key AndroidDebugKey from store “C:Users13181.androiddebug.keys
- Android Studio 关联第三方模拟器_ADB命令配置和VT设置教程链接