昨天终于升级了下Ubuntu系统到16.04LTS,之前是12.04LTS(导致内网一些同事开发的网址无法打开,以及其他工具软件无法安装)。

安装完android开发工具,运行之前的project,出现如下的错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugAidl'.
> java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing '/opt_dev/android-sdk-linux_new/build-tools/23.0.3/aidl' with arguments {-p/opt_dev/android-sdk-linux_new/platforms/android-/framework.aidl -o/home/dream/workspace/NewUserHomePage/build/generated/source/aidl/debug} * Try:

google了下,网上的错误跟这个还不一样都是missing aidl 替换或者重新安装build tools版本即可,在stackoverflow上有个人跟我一样的问题,但是没有人回复。

我以为是我的sdk的问题,这个sdk来自之前的系统安装的,所以重新下了个sdk,还是出现这样的错误。

接着怀疑是不是android studio/gradle的问题,都重新部署了,还是有问题。

后来,在android studio 中点开Gradle console,才终于找到问题所在:

:compileDebugAidl
/opt_dev/android-sdk-linux_new/build-tools/23.0./aidl: error while loading shared libraries: libgcc_s.so.: cannot open shared object file: No such file or directory /opt_dev/android-sdk-linux_new/build-tools/23.0./aidl: error while loading shared libraries: libgcc_s.so.: cannot open shared object file: No such file or directory FAILED /opt_dev/android-sdk-linux_new/build-tools/23.0./aidl: error while loading shared libraries: libgcc_s.so.: cannot open shared object file: No such file or directory /opt_dev/android-sdk-linux_new/build-tools/23.0./aidl: error while loading shared libraries: libgcc_s.so.: cannot open shared object file: No such file or directory

直觉是,这个aidl共享库引用了32位的libgcc_s.so,但是系统里面没有这个,所以运行如下的命令:

sudo apt-get install lib32gcc1

重新build,OK了

奇怪的是,我之前安装过32位的兼容so了啊,可能不全吧

android sdk的很多so或者工具都是基于32位系统开发的,而Ubuntu 16.04 是64位系统(可以运行 uname -a 来查看,有x86_64的就是了),所以需要安装一些32位的so

Execution failed for task ':compileDebugAidl'.的更多相关文章

  1. Android Studio 中 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileDebugAidl'.的问题解答

    Android Studio 中 FAILURE: Build failed with an exception. * What went wrong: Execution failed for ta ...

  2. Error:Execution failed for task ':app:compileDebugAidl'. > java.lang.IllegalStateException: aidl is missing from '/Users/renguodong/Library/Android/sdk/build-tools/26.0.2/aidl'

    错误信息:Error:Execution failed for task ':app:compileDebugAidl'. > java.lang.IllegalStateException: ...

  3. Error:Execution failed for task ':app:clean'.

    运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可.

  4. Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

    使用android studio 时,编译成功但用build apk时却报错 环境: android studio 1.5, jdk1.7 错误:Error:Execution failed for ...

  5. Android Studio 运行出现 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    转载请标明出处: http://www.cnblogs.com/why168888/p/5978381.html 本文出自:[Edwin博客园] 我引用compile 'com.squareup.re ...

  6. Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录

    转载请标明出处: http://blog.csdn.net/lxk_1993/article/details/50511172 本文出自:[lxk_1993的博客]:   3个错误non-zero e ...

  7. Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f

    今天调试安卓程序遇到的问题Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching fa ...

  8. cordova编译报错:Execution failed for task ':processDebugResources'

    cordova编译报错:Execution failed for task ':processDebugResources' 引发这个错误的最扩祸首就是一个中文命名的文件,不知道什么时候加入的,我写了 ...

  9. 关于vs生成app错误提示,提醒Execution failed for task ':transformClassesWithDexForDebug'.

    昨天将vs和android SDK更新之后生成app之后发现app生成出错,报错如下: FAILURE: Build failed with an exception. * What went wro ...

随机推荐

  1. P1220 关路灯 区间dp

    题目描述 某一村庄在一条路线上安装了n盏路灯,每盏灯的功率有大有小(即同一段时间内消耗的电量有多有少).老张就住在这条路中间某一路灯旁,他有一项工作就是每天早上天亮时一盏一盏地关掉这些路灯. 为了给村 ...

  2. OpenJ_Bailian 4017 爬楼梯

    时间限制: 1000 ms  空间限制: 262144 KB 题目描述 树老师爬楼梯,他可以每次走1级或者2级,输入楼梯的级数,求不同的走法数.例如:楼梯一共有3级,他可以每次都走一级,或者第一次走一 ...

  3. html-div+span-4

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. Codeforces 870C Maximum splitting (贪心+找规律)

    <题目链接> 题目大意: 给定数字n,让你将其分成合数相加的形式,问你最多能够将其分成几个合数相加. 解题分析: 因为要将其分成合数相加的个数最多,所以自然是尽可能地将其分成尽可能小的合数 ...

  5. Linux学习之源码包安装与脚本安装(十八)

    Linux学习之源码包安装与脚本安装 目录 源码包与RPM包的区别 源码包安装 脚本安装 源码包与RPM包的区别 1.区别 安装之前的区别:概念上的区别 安装之后的区别:安装位置不同 源码包: 开源的 ...

  6. hdu2473

    hdu2473并查集的删除操作建立虚点,删除它就断掉了它在原图中的所有关系,而成为独立节点,而且它只能被删除一次,而且删除之后还能进行操作,采用映射(虚点)的方法,建立虚点并把删除之后的操作挪到虚点上 ...

  7. AOP编程-理论篇

    本节内容主要讲解AOP编程理念,包括概念讲解,使用AOP的优势,如何实现AOP,常见的实现AOP的方法. 1.AOP的概念 AOP是Aspect Oriented Programming的缩写,意思是 ...

  8. linux 学习笔记 软件包管理

    >查询文件所属软件包 #rpm -qf /usr/share/pixmaps/xplns.png 查询某个文件所属软件包 >查询软件包所包含文件列表 #rpm -ql xplus-3.3. ...

  9. Unity IOC容器的构造函数使用笔记(不能错过的Unity示例)

    示例一,正常使用: 相关定义: public interface ICar { int Run(); } public class BMW : ICar { ; public int Run() { ...

  10. SQL 2016 正式版 安装过程

    1.点击全新安装 2.接着就是下一步,下一步... 3.选择你要安装的功能    [可以利用PolyBase,使用标准TSQL查询hadoop数据,但这里我不需要装] 4.设置排序规则 5.设置登录用 ...