执行失败的任务“:应用程序:compileDebugAidl':AIDL丢失 [英] Execution failed for task ':app:compileDebugAidl': aidl is missing

查看:1681
本文介绍了执行失败的任务“:应用程序:compileDebugAidl':AIDL丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装我的电脑上的Andr​​oid工作室。我创建了一个新的项目,但是,以下让我的错误。我该怎么办?

 错误:执行失败的任务:应用程序:compileDebugAidl。
> AIDL缺失

我的Andr​​oid Studio版本是 1.1.0

这是我的的build.gradle 文件:

  buildscript {
    库{
        jcenter()
    }
    依赖{
        类路径'com.android.tools.build:gradle:1.1.0
        //注意:不要在这里把你的应用程序依赖关系;他们属于
        //在单个模块的build.gradle文件
    }
}
allprojects {
    库{
        jcenter()
    }
}

 应用插件:'com.android.application安卓{
    compileSdkVersion 21
    buildToolsVersion24.1.2    defaultConfig {
        的applicationIDcom.example.jo.cloning_a_login_screen
        13的minSdkVersion
        targetSdkVersion 21
        版本code 1
        的versionName1.0
    }
    buildTypes {
        发布 {
            minifyEnabled假
            proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
        }
    }
}依赖{
    编译文件树(导演:'库',包括:['的* .jar'])
    编译com.android.support:appcompat-v7:22.0.0
}


解决方案

在我来说,我下载了版本的Andr​​oid M和Android 5.1.1版本22采用Android工作室1.2.1.1,但是当我尝试做一个Hello World此相同的错误给我看了

所以对我来说将溶液做右键单击在app像下面的图片,然后选择打开模块设置

再有,你有2个选项。我用最后的版本我都修改了。

编译SDK版本API 21棒棒堂

和生成工具版本21.1.2到

最后清理项目和建设

更新时间:

要获取的Andr​​oid 1.3工作室遵循这个步骤


  1. 选择文件>设置打开设置窗口。

  2. 选择外观和放大器;行为>系统设置>更新面板。

  3. 在更新面板中,选择该选项自动检查更新:加那利香奈儿

  4. 在更新面板中,选择立即检查可检查最新版本的金丝雀。当系统提示您下载并安装版本。

然后你就会有这样的事情来更新您的Andr​​oud工作室到1.3,并与这个你可以测试版本的Andr​​oid M

更新:真正的原因

这个错误发生在SDK版本,构建工具和插件摇篮不匹配(在兼容性方面)。该解决方案是,如果你在使用它们的最新版本进行验证。所述的gradle插件被放置在该项目的的build.gradle,另一版本在模块的build.gradle。例如,对于SDK 23,您必须使用生成工具23.0.1和插件的gradle 1.3.1版。

I installed Android Studio on my computer. I created a new project but that got me the error below. What can I do?

Error:Execution failed for task ':app:compileDebugAidl'.
> aidl is missing

My Android Studio version is 1.1.0.

This is my build.gradle file:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        jcenter()
    }
}

And :

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "24.1.2"

    defaultConfig {
        applicationId "com.example.jo.cloning_a_login_screen"
        minSdkVersion 13
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
}

解决方案

In my case I downloaded version 22 of Android M and Android 5.1.1 using Android Studio 1.2.1.1 but when I try to do a Hello World this same error showed me

So the solution for me was doing right click in app like the image below and choose "Open Module Settings"

then there you have 2 options. I've changed both with the last version I had.

Compile SDK version to API 21 Lollipop

and Build Tools Version to 21.1.2

Finally clean the project and Build

UPDATED

TO Get Android Studio 1.3 follow this steps

  1. Open the Settings window by choosing File > Settings.
  2. Choose the Appearance & Behavior > System Settings > Updates panel.
  3. On the Updates panel, choose the option Automatically check updates for: Canary Chanel.
  4. On the Updates panel, select Check Now to check for the latest canary build. Download and install the build when you are prompted.

Then you'll have something like this to update your Androud Studio to 1.3 and with this you can test Android M

Update: Real Cause

This bug happens when the versions of SDK, Build Tools and Gradle Plugins doesn't match (in terms of compatibility). The solutions is verify if you is using the latest versions of them. The gradle plugins are placed in the build.gradle of the project, and the other versions are on the build.gradle of the module. For example, for SDK 23, you must use the Build Tools 23.0.1 and gradle plugins version 1.3.1.

这篇关于执行失败的任务“:应用程序:compileDebugAidl':AIDL丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆