昨天终于升级了下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. 移动端自动化测试(一)之 Appium+Pyhton环境准备篇

    移动端自动化测试(一)之 Appium+Pyhton环境准备篇 2016-11-17 16:51 by CockRoacher, 5046 阅读, 1 评论, 收藏, 编辑 由于工作的需要进行Andr ...

  2. .netcore加入APM系统 SkyWalking

    安装环境:windows 2016 必要条件: JDK8+ Elasticsearch 5.x(注:目前不支持es6) 8080,10800,11800,12800 端口不被占用 下载skywalki ...

  3. Url地址重写

    一 什么是url重写URL 重写是截取传入 Web 请求并自动将请求重定向到其他 URL 的过程.比如浏览器发来请求 hostname/101.aspx ,服务器自动将这个请求中定向为http://h ...

  4. python 列表list操作

    1. 切片:(左闭右开) 用-1倒置 2. 拆包 3. list的append 与 insert 4. 两个列表合并,直接 + : 5. 加入列表 extend: 6. pop()删除(通过序号,或最 ...

  5. thinkphp模板继承

    public/base.html <!DOCTYPE html> <html lang="en"> <head> <meta charse ...

  6. lamp源码安装

    先从Apache开始装->MySQL->PHP PHP在编译的时候需要用到MySQL的一些参数,需要用到Apache的参数. 准备工作: 1.查看系统中是否有自带的Apache 如果提示你 ...

  7. Full Tank? POJ - 3635 (bfs | 最短路)

    After going through the receipts from your car trip through Europe this summer, you realised that th ...

  8. HDU 4635 Strongly connected (强连通分量+缩点)

    <题目链接> 题目大意: 给你一张有向图,问在保证该图不能成为强连通图的条件下,最多能够添加几条有向边. 解题分析: 我们从反面思考,在该图是一张有向完全图的情况下,最少删去几条边能够使其 ...

  9. BZOJ-7-2655: calc-DP-拉格朗日插值

    https://www.lydsy.com/JudgeOnline/problem.php?id=2655 以上是对 dp 一小部分打的表.dp[ i ] [ j ]  含义为 前 i 个 数 中 选 ...

  10. 自己总结的C#编码规范--4.注释篇

    注释 注释毫无疑问是让别人以最快速度了解你代码的最快途径,但写注释的目的绝不仅仅是"解释代码做了什么",更重要的尽量帮助代码阅读者对代码了解的和作者一样多. 当你写代码时,你脑海里 ...