昨天终于升级了下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. POJ1330Nearest Common Ancestors

    去博客园看该题解 题意 第一行输入T,有T组数据. 对于每组数据,给出一棵树,先输入n,然后n-1行,每行两个数a,b,表示a是b的父亲:第n行输入两个数A,B表示询问A和B的最近公共祖先. 题解 L ...

  2. Calendar抽象类的使用

    Calendar timeNow = Calendar.getInstance(); int year = timeNow.get(Calendar.YEAR); // 这里月是从0开始的,即0到11 ...

  3. Redis+Shiro+Spring-data-redis,共享Session

    环境:centos7,Java1.8+,一个Nginx,两个Tomcat,一个Redis. 关于共享session的问题大家都应该知道了,传统的部署项目,两个相同的项目部署到不同的服务器上,Nginx ...

  4. MongDB-高级

    No1: 聚合 聚合(aggregate)主要用于计算数据,类似sql中的sum().avg() ---语法 db.集合名称.aggregate([{管道:{表达式}}]) No2: 管道 管道在Un ...

  5. Gym 102091K The Stream of Corning 2【线段树】

    <题目链接> 题目大意: 进行两种操作:1.给定一个数的出现时间.价值.消失时间: 2.进行一次询问,问你当前时间,第K大的数的价值. 解题分析: 采用离线集中处理,将每个数的出现时间和它 ...

  6. Pandas学习2 --- 数据类型Series、DataFrame

    为了更加清楚显示,请点击链接用Jupyter Notebook 查看:截图如下,

  7. 一个小demo 实用selenium 抓取淘宝搜索页面内的产品内容

    废话少说,上代码 #conding:utf-8 import re from selenium import webdriver from selenium.webdriver.common.by i ...

  8. css的基本定位机制

    分为三种:普通流.浮动.绝对定位 普通流:默认,html文档的排列顺序块级从上到下(垂直距离由margin-top.margin-bottom决定):行内元素在一行中从左到右(由margin-left ...

  9. Bluestein's Algorithm

    网上很少有人提到,写的也很简单,事实上就是很简单... \(Bluestein's\ Algorithm\),用以解决任意长度\(DFT\). 考虑\(DFT\)的形式:\[\begin{aligne ...

  10. BUG——Celery ValueError: not enough values to unpack

    背景 最近因项目需要,学习任务队列Celery的用法,跟着官网写Demo,出现如题错误,最终在github的Issues里找到解决办法,记录如下. 场景还原 本地环境如下: Windows 7 Pyt ...