I updated android studio from version 1.0 to 1.2.1 and when I started my first application the this appears.
Error:Execution failed for task ':app:compileDebugAidl'.
aidl is missing
I have made sure that all sdk are up to date. This is my gradle build code.
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc1"
defaultConfig {
applicationId "com.example.william.myapplication"
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName "1.0"
compileSdkVersion 21
}
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.2.0'
}
It seems that AndroidStudio-1.3-Preview is using an unexpected version of the gradle plugin. (at least when you create a fresh new project)
Similarly, if you open an existing project using:
---> you will probably have this strange error : "aidl is missing" (even in projects not using aidl !)
Solution:
Be sure to use the latest android-gradle-plugin (in the root build.gradle) :
classpath 'com.android.tools.build:gradle:1.3.0-beta1'
under buildscript-->dependencies.
Example :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0-beta1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
and the latest build tools (in module build.gradle):
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc1"
... }
BE AWARE that with this config you are using the latest build tools -not released yet- and the preview of Android-M ---> things can be unstable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With