Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (2014) Getting Started with Android Running the Fun Facts Project

I keep getting the following error: Error:Execution failed for task ':app:compileDebugAidl'. > aidl is missing

I keep getting the following error:

Error:Execution failed for task ':app:compileDebugAidl'.

aidl is missing

What do I do?

2 Answers

Hello,

Google recently released the Android M preview builds and APIs for developers. This is causing problems for people which I believe is what is causing this error. Your best bet is to download API 21, build tools 21.1.2 and update your build.gradle file to use API 21 for compiling, and targetting(this is perfect fine for learning here, but might need some tweaks for actually releasing your app, but hopefully Google will have things sorted out by then). So your build.gradle might look similar to:

apply plugin: 'com.android.application'

android { 

compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "your.application.id"
    minSdkVersion 15
    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:21.1.2' 
}

Please let us know if this fixes the issue or not. If not, we can try some other troubleshooting to try to get everything up and running.

Edit Also remember after changing the build.gradle file you should resync your project(Android Studio should prompt you to do so right above the text editing area) and you'll want to clean and rebuild your project(use the Build menu and go to clean, then again to make project).

Jessica Soruco
Jessica Soruco
5,843 Points

I'm having the same problem.

How do I complete what you say when stating:

Your best bet is to download API 21, build tools 21.1.2

UPDATE: the only thing that worked for me to solve this problem was: http://stackoverflow.com/a/30598930/4031815

You can download API 21 using the SDK Manager from within Android Studio. You can find more info on how to do this here.

Thanks James, got it running :)

You're welcome. Have fun with Android development.