Android Studio Gradle BuildTools Revision - android

I have an Android Project in Android Studio 0.5.9 and Gradle is throwing this error:
Error:The SDK Build Tools revision (17.0.0) is too low. Minimum required is 19.0.0
I have already installed SDK Build Tools Revision 19 from the SDK Manager and here is my build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 17
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'Manantiales/src/main/AndroidManifest.xml'
}
}
}
How do I tell gradle to use the Build Tools 19 if it's already installed?
EDIT: I marked a different answer as The Best Answer because it was the one that worked for most people

I had the same problem this morning after updating to .6.0. You need to change you gradle version in /projectName/build.gradle
classpath 'com.android.tools.build:gradle:0.11.+'
Open your SDK manager and download the new version of the build tools 19.1 then change the following line in /projectName/moduleName/build.gradle
android {
compileSdkVersion 19
buildToolsVersion "19.1" //This version needs to be updated to 19.1 after SDK update
...
}
Then sync your gradle files and you should be good to go!

I didn't realize that my errors changed when I changed buildToolsVersion "19.0.0" to buildToolsVersion "19.1.0" in my build.gradle.
The first error was:
Error: The SDK Build Tools revision (19.0.0) is too low for project 'android'. Minimum required is 19.1.0
The second error was a little bit different, but I didn't see it:
Error: The SDK Build Tools revision (19.0.0) is too low for project ':CordovaLib'. Minimum required is 19.1.0
So I've also changed the build.gradle inside the CordovaLib folder, and the error disappeared.

I have just recently updated my android studio to 0.6.0, and it was giving me the same problem. But my build was 19.0.3, instead of 19.1.0. I changed the buildToolsVersion "19.0.3" to --> "19.1.0" which it forced the Gradle to download the updates. I restarted my Android Studio, and the error went away. Not sure exactly how to explain, but I think it forces it to download the patch off the Maven site, and does its justice behind scenes. And just as Gabriel Matusevich said, the build.gradle is located ProjectFolder -> AppFolder -> build.gradle
Exception: I havn't completed tested this out, but I did notice the Gradle was downloaded from the site, I havn't added or deleted code, or ran the application yet. So to be sure, remember the buildToolsVersion number you had before!

Open Android SDK Manager and make sure you have Build Tools 19.1 downloaded. Double-check.
Then find build/app.gradle and change buildToolsVersion number to '19.1':
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.1'
defaultConfig {
minSdkVersion 10
targetSdkVersion 19
}

I fixed this issue by going into myAppProject/actionbarsherlock/build.gradle and changing
android {
compileSdkVersion 14
buildToolsVersion '17.0.0'
to this
android {
compileSdkVersion 14
buildToolsVersion '19.1.0'

I found the problem, build.gradle was on the wrong folder

Hi for me after download the last version of the android SDK Tools, I change the android version F4 (Module Settings)
https://www.dropbox.com/s/9ypuepxfwlcp4e5/Captura%20de%20pantalla%202014-06-10%2000.45.38.png

I had the same problem. This is what me solved this problem.
Step 1: Go To SDK Manager
Step 2: Upgrade your Android sdk Build-Tool From current to updated version. (In my case am upgrade it to 21.1.2)
Step 3: Rebuild your application.
This Steps Solved My Problem. Hope it solves your problem too.

i fix the problem in this way:
Go to:
projectFolder/gradle.proprieties
modify the ANDROID_BUILD_TOOLS_VERSION=19(or another version) to
ANDROID_BUILD_TOOLS_VERSION=19.1

I too faced the same problem and the fix was so simple. Just launch android SDK manager and check the latest build tools. Finally click on install packages which were selected. Now restart the IDE and try building the project.

change in build.gradle "project: layout xml"
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
} allprojects {
repositories {
jcenter()
}
}

Related

No resource found that matches the given name: attr 'android:keyboardNavigationCluster'. when updating to Support Library 26.0.0

I've got this issue while updating to the latest Support Library version 26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0):
Error:(18, 21) No resource found that matches the given name: attr
'android:keyboardNavigationCluster'.
/.../app/build/intermediates/res/merged/beta/debug/values-v26/values-v26.xml
Error:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:(18, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:(18, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:Execution failed for task ':app:processBetaDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
The file is from the support library:
<style name="Base.V26.Widget.AppCompat.Toolbar" parent="Base.V7.Widget.AppCompat.Toolbar">
<item name="android:touchscreenBlocksFocus">true</item>
<item name="android:keyboardNavigationCluster">true</item>
</style>
We're using the following versions:
ext.COMPILE_SDK_VERSION = 26
ext.BUILD_TOOLS_VERSION = "26.0.1"
ext.MIN_SDK_VERSION = 17
ext.TARGET_SDK_VERSION = 26
ext.ANDROID_SUPPORT_LIBRARY_VERSION = "26.0.0"
ext.GOOGLE_PLAY_SERVICES_LIBRARY_VERSION = "11.0.2"
compile 'com.android.support:appcompat-v7:' + ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:design:' + ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:recyclerview-v7:' + ANDROID_SUPPORT_LIBRARY_VERSION
Any ideas?
I was able to resolve it by updating sdk version and tools in gradle
compileSdkVersion 26
buildToolsVersion "26.0.1"
and support library 26.0.1 https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-1
Change
Compile SDK Version:
compileSdkVersion 26
Build Tool Version:
buildToolsVersion "26.0.1"
Target SDK Version:
targetSdkVersion 26
Dependencies:
compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support:design:26+'
compile 'com.android.support:recyclerview-v7:26+'
compile 'com.android.support:cardview-v7:26+'
Sync Gradle.
I had to change compileSdkVersion = 26 and buildToolsVersion = '26.0.1' in all my dependencies build.gradle files
In my react-native project, this error is generated in the react-native-fbsdk. Updating the react-native-fbsdk/android/build.gradle as following fixes the issue.
compileSdkVersion 26
buildToolsVersion "26.0.1"
I hit this exact same error and was Googling all over trying to find what I'm doing wrong as that is generated build values-26 code and not styles that I provided. I tried everything from Gradle 4.0 to Android Studio preview 3.0 to canary channel, you name it.
I never found the answer online. In the end, I was able to go back to standard Dev Android Studio and 2.3.3 Gradle as I ended up accidentally fixing it :).
Turned out I was so focused on updating my library project that I was not noticing that the error was caused from an unused sub module (demo app) that is nested in my library project. Once I updated the sub module to match the 26 build tools and 26+ design and support libraries my problem went away.
Not sure if that is what you are seeing as well, but personally I was only updating the lib to release again so wasn't caring about the sample app module, and the error sure appeared to be related to 26 sdk which I only touched in the lib module so wasn't thinking to check the other one. So that was the problem all along for me. Hopefully that fixes you as well. I had this error in 2 library projects and it fixed it in both.
Goodluck either way and if this doesn't resolve your issue, please share what did. BTW 26.0.01 build tools and 26.1.0 design and support is where I ended up going to in the end, although 26.0.1 worked fine as well.
I had this exact error and I realized the my compileSdkVersion was set at 25 and my buildToolsVersion was set at "26.0.1".
So I just changed the compileSdkVersion to 26 and synced the Gradle. it fixed the problem for me.
EDIT: my targetSDKVersion was also set as 26
I've had a similar error for react-native-youtube & react-native-orientation.
Figured out, that the build.gradle of those Project use compileSdkVersion 23 but the Feature: android:keyboardNavigationCluster was added since api 26 (android 8).
So how to fix?
One way to fix this easily is to edit your /android/build.gradle ( !!! NOT /android/app/build.gradle) and add those code at the bottom of the file.
This allow you to force the SDK and BuildTool-Version your submodules use:
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
}
}
}
}
I also faced this issue you just need to make 2 changes:
File Name : android/build.gradle mention this below code
subprojects {
afterEvaluate {
project -> if (project.hasProperty("android")) {
android {
compileSdkVersion 26 buildToolsVersion '26.0.2'
}
}
}
}
File Name :android/app/build.gradle
change your compliesdk version and buildToolVersion like this:
compileSdkVersion 26 buildToolsVersion "26.0.2"
and in
dependencies {
compile 'com.android.support:appcompat-v7:26.0.2'
}
I had the same issue with my Ionic 2 project, all I did to resolved the issues was
Open "ionic_project_folder/platforms/android/project.properties"
Change target=android-25 to target=android-26
Run ionic build --release android
Hope this helps someone!
//Adding this to the root build.gradle solved my problem, thanks #Yalamber
subprojects {
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
}
}
}
}
After updating your android studio to 3.0, if this error occurs just update the gradle properties, these are the settings which solved my issue:
compileSdkVersion 26
targetSdkVersion 26
buildToolsVersion '26.0.2'
I updated my project app/build.gradle to have
compileSDkVersion 26
buildToolsVersion '26.0.1'
However, the problem was actually with the react-native-fbsdk package. I had to change the same settings in node_modules/react-native-fbsdk/android/build.gradle.
In android studio, right click on the project (since I had a Cordova project, I had CordovaLib and android: I selected android in my case),
Select Open Module Settings
In the Project Structure modal that pops up select the project in the modules section in the side panel (again android in my case)
Click on the Dependencies tab
Click on the green plus button in the top right corner
Select Library Dependency
Select app-compat-v7 from the dropdown
Clean project and rebuild
I hit this recently and remember where it comes from. It's a mismatch between the Xamarin.Android.* version and the installed Android SDK version.
The current VS2017 15.5.3 new project defaults for nuGet Xamarin.Android.* are 25.4.0.2 and the default VS install for cross platform development are the following Android SDK packages:
Android 7.1 - Nougat
Android SDK Platform 25
Google APIs Intel x86 Atom System Image
If you upgraded you solution nuGet for Xamarin.Android.* to 26.1.0.1 then you will need to install the follow in the Android SDK:
Android 8.0 - Oreo
Android SDK Platform 26
Google APIs Intel x86 Atom System Image
I was facing the same issue for one of my PhoneGap project (Android studio 3.0.1). To resolve this I have followed, the following step
1) Right click on Project name (In my Case android), select "Open Module Settings"
2) Select modules (android and CordovaLib)
3) Click properties on top
4) Chose Compile SDK version (I have chosen API 26: Android 8.0 )
5) Choose Build Tools Version (I have chosen 26.0.2)
6) Source Compatibility ( 1.6)
7) Target Compatibility ( 1.6)
Click Ok and rebuild project.
The following link shows my setting for step I have followed
https://app.box.com/s/o11xc8dy0c2c7elsaoppa0kwe1d94ogh https://app.box.com/s/ofdcg0a8n0zalumvpyju58he402ag1th
when you try to change targetSDKVersion 26 to 25 that time occurred
i was found solution of No resource found that matches the given name: attr 'android:keyboardNavigationCluster'. when updating to Support Library 26.0.0
Just Chage This code from Your Build.gradle
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.1'
}
}
}
}
to
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.2.0'
}
}
}
}
I got this issue when compile react-native-fbsdk
I resolved this issue by change build.gradle of react-native-fbsdk
from
compile('com.facebook.android:facebook-android-sdk:4.+')
to
compile('com.facebook.android:facebook-android-sdk:4.28.0')
This issue was caused by one of the libraries for me that needed version 26 for compilation.
Making the targetSdkVersion to 26 will cause other issues and you will have to tweak your app to adapt to the Oreo platform. This is not the correct solution for all.
Just making the compileSdkVersion to 26 and buildToolsVersion to 26.0.2 worked for me.
One should also update all of their support libraries to use 26.1.0 or later.
update these in gradle
compileSdkVersion 27
buildToolsVersion '27.0.1'
I resolved this issue by making some changes in build.gradle file
Changes in root build.gradle are as follows:
subprojects {
afterEvaluate {
project -> if (project.hasProperty("android")) {
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
}
}
}
}
Changes in build.gradle are as follows:
compileSdkVersion 26
buildToolsVersion "26.0.1"
and
dependencies {
compile 'com.android.support:appcompat-v7:26.0.1'
}
For anyone using nativescript and facing this issue: you can add
compileSdkVersion 26
buildToolsVersion '26.0.1'
in App_Resources/Android/app.gradle (under android {)
Then run tns platform remove android and tns build android in your project root.
Make sure you have Android SDK 8.0 on your development environment. I was having the same issue on my MAC and installing SDK 8.0 and its tools fixed it. I am having the same issue on Windows. I am downloading the SDK now.
i had the same issue with ionic .
cordova platform remove android
cordova platform add android#6.4.0
And replace in platform/android/projet.properties
cordova.system.library.1=com.android.support:support-v4+
To
cordova.system.library.1=com.android.support:support-v4:26+
For this you have to do below things
1.right click the project click.
2.open module settings->in properties tab->change the compile sdk and build tool version into 26,26.0.0.
3.click ok.
Its working for me after an hour tried.
I solved this problem by doing the following:
compileSdkVersion 26
buildToolsVersion "26.0.1"
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
Just clear your project and build again.
./gradlew app:clean app:assembleDebug
But it not works when targetSdkVersion or compileSdkVersion is 25.

Why I can't use low version buildTools?

When I use 25.0.0, my project appear some bug(Floating Action Button doesn't show). But I can choice low version.
Error:The SDK Build Tools revision (24.0.3) is too low for project ':app'. Minimum required is 25.0.0
change classpath 'com.android.tools.build:gradle:+' to classpath 'com.android.tools.build:gradle:2.2.2' , and now ,I can use 24.0.3
I would guess that you have a build.gradle file that defines buildToolsVersion "25.0.0". But you only have version 24.0.3 installed.
Either upgrade your build tools by installing a newer version using Tools/Android/SDK Manager/SDK Tools or change the requirements on the app's build.gradle file to require the version you seem to have (24.0.3).
Make sure your compileSdkVersion does not overlap with your buildToolsVersion.
What I do in my project is I match the compileSdkVersion and buildToolsVersion. Looks like this.
compileSdkVersion 24
buildToolsVersion '24.0.2'
defaultConfig {
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
Also, you can always check for updates from the SDK Manager in Android Studio.
Please take a look at this also,
What is the buildToolsVersion for android SDK 24?
Cheers!

The SDK platform-tools version (24.0.4) is too old to check APIs compiled with API 25; please update

I am getting this error on the latest version of Android Studio and while I have installed both Android SDK Platform API 25 and Android SDK Build-Tools 25.
As Vishnu said, For me updating Android studio and Gradle didn't fix the problem.
I navigated to Tools -> Android -> SDK Manager and selected BuildTools and checked for the updates related to platform tools. After updating and installing those, fixed my problem.
And for one my friends, the issue got resolved after following the above steps and then navigating to Help->Check for updates-> and installing all the available updates.
Attached Screenshot for the same.
I am facing similar issue after upgrading Android Studio to 3.0. A very simple way to fix this is go to
Tools -> Android ->SDK Manager -> SDK Tools
There look for Android SDK platform tools and update it. (Screenshot attached)
Thats it, you don't have to change any other gradle setting.
I had a similar problem. Updating Android Studio to version 2.2.2 (latest at the time of this writing) and Gradle version to 2.2.2 (latest at the time of this writing) in project_name/build.gradle file fixed this issue.
For reference, this is my config in project_name/app/build.gradle file:
minSdkVersion = 19
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = "25"
supportLibraryVersion = "25.0.0"
And this is my dependencies in project_name/build.gradle file :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Open AndroidMainfest.xml
Click the red icon => Disable inspection => Error is gone
I face same problem but when I swap
buildToolsVersion "25.0.0"
to first line then problem solved. Then the final app grade become:
android {
buildToolsVersion "25.0.0"
compileSdkVersion 25
defaultConfig {
applicationId "com.***"
minSdkVersion 15
targetSdkVersion 25
versionCode 0
versionName "0.0.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Update your android sdk platform-tools to the revision from 24.0.4 to 25.x.x on sdk manager. Then android studio click File->Invalidate Caches/Restart...
The error must be gone now.
Try to update
Android SDK Build-Tools
Android SDK Platform tools
Android SDK Tools
Android Support Repository
Google Play Services
Google repository
etc to the latest version. Error must be gone.
Go to Gradle(app) and replace
buildToolsVersion "25"
to
buildToolsVersion "24.0.4" // Or Latest installed gradle version
also if targetSdkVersion is 25 then make this 24
On command line
./sdkmanager "platform-tools" "platforms;android-26"
./sdkmanager --list
Check if you have update to latest release

Which gradle version to use with the latest Android Studio?

Could not find a definite resource as of which gradle, gradleplugin versions to use with a specific / latest AndroidStudio version.
UPDATE:
Best official resource answering the question: http://tools.android.com/tech-docs/new-build-system/version-compatibility
Official documentation is what you need: https://developer.android.com/tools/revisions/gradle-plugin.html
UPDATE JANUARY 2017
Android Studio 2.2.3
Gradle 2.2.3 or higher.
Build Tools 25.0.2 or higher.
Using Android Studio 1.3 with this dependencies:
Gradle 2.2.1 or higher.
Build Tools 21.1.1 or higher.
Also, Gradle 2.7 was release 14th September 2015: http://gradle.org/
This would be more of a comment but I haven't accumulated enough points as of yet.
If you've updated your Android Studio to 1.3.2 version then I would suggest using Build Tools Version 23.0.0 and compile API 23 Android 6.0.
In your top level gradle file;
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "your.package.name"
minSdkVersion 15 // min sdk can be any sdk you want to target
targetSdkVersion 23 // target compiled version
}
}
As for Gradle Version - 2.4 or higher up to latest 2.7.
In your App gradle file;
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

Execution failed for task ':app:compileDebugAidl': aidl is missing

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 these steps
Open the Settings window by choosing File > Settings.
Choose the Appearance & Behavior > System Settings > Updates panel.
On the Updates panel, choose the option Automatically check updates for: Canary Chanel.
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 solution is to verify whether you are using the latest version of them or not. 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.
It has been fixed two days ago, so you can use:
buildToolsVersion '23.0.0 rc2'
with the newest android gradle plugin:
classpath 'com.android.tools.build:gradle:1.3.0-beta2'
Note:
I had some weird problems with gradle 2.4 distribution, but trying to build the project again has fixed that for me.
EDIT
There is a newer version of build-tools 23, so you should probably use:
buildToolsVersion '23.0.0 rc3'
EDIT 2
And yet again, there are newer version of both gradle plugin and build-tools, so you can switch to using:
classpath 'com.android.tools.build:gradle:1.3.0'
and
buildToolsVersion '23.0.0'
I had a similar error with a fresh install of Android Studio 1.2.1.1 attempting to build a new blank app for API 22: Android 5.1 (Lollipop).
I fixed it by simply changing the Build Tools Version from "23.0.0 rc1" to "22.0.1" and then rebuilding.
On Windows, F4 opens the Project Structure and the Build Tools Version can be set in the Modules > app section:
I think all this does is change the setting in the build.gradle file in the app but I didn't want to change that manually just in case it does something more.
I tried to uninstall/install and it did not work. I am running OSX 10.10.3 with Android Studio 1.2.1.1 on JDK 1.8.0_45-b14 and the solution I found to work is similar to Jorge Casariego's recommendation. Basically, out of the box you get a build error for a missing 'aidl' module so simply changing the Build Tools Version to not be version 23.0.0 rc1 will solve your problem. It appears to have a bug.
UPDATE
After commenting on an Android issue on their tracker (https://code.google.com/p/android/issues/detail?id=175080) a project member from the Android Tools group commented that to use the Build Tools Version 23.0.0 rc1 you need to be using Android Gradle Plugin 1.3.0-beta1 (Android Studio comes configured with 1.2.3). He also noted (read the issue comments) that the IDE should have given an notification that you need to do this to make it work. For me I have not seen a notification and I've requested clarification from that project member. Nonetheless his guidance solved the issue perfectly so read on.
Solution: Open your build.gradle for your Project (not Module). Find the line classpath com.android.tools.build:gradle:xxx under dependencies where xxx is the Gradle Plugin version and make the update. Save and Rebuild your project. Here is the Android Gradle docs for managing your Gradle versions: https://developer.android.com/tools/revisions/gradle-plugin.html
I was able to get build to work with Build Tools 23.0.0 rc1 if I also opened the project level build.gradle file and set the version of the android build plugin to 1.3.0-beta1. Also, I'm tracking the canary and preview builds and just updated a few seconds before, so perhaps that helped.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
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
}
}
allprojects {
repositories {
jcenter()
}
}
Quick fix that worked for me:
Right click on project->"Open Module Settings"->Build Tools Version change to: 22.0.1
To build your application without aidl is missing error with compileSdkVersion 23 and buildToolsVersion "23.0.1" you should specify latest versions for Android Gradle plugin (and Google Play Services Gradle plugin if you are using it) in main build.gradle file:
buildscript {
repositories {
...
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.google.gms:google-services:1.3.1'
}
}
I had the same error i fixed it by going to the build.gradle (Module: app) and changed this line from :
buildToolsVersion "23.0.0 rc1"
to :
buildToolsVersion "22.0.1"
You will need to go the SDK Manager and check if you have the 22.0.1 build tools. If not, you can use the right build tools but avoid the 23.0.0 rc1.
Essentially Matt Daley/Johnny Mohseni's solution worked for me.
I faced exactly the same problem on a fresh Android Studio V 1.2.1.1 installation. I created a new project (blank activity) and straightaway god this build error.
Error:Execution failed for task ':app:compileDebugAidl'.
> aidl is missing
As suggested, changing the gradle dependency from 1.2.3 to 1.3.0-beta1 fixed it.
classpath 'com.android.tools.build:gradle:1.3.0-beta1' // <--- WORKS!
//classpath 'com.android.tools.build:gradle:1.2.3' // <--- default - failed
Once 1.3.0-beta1 change was saved, I got a prompt to upgrade dependencies. Upon accepting the request to upgrade, the gradle build status bar at the bottom tracked the packages being synced. When that completed, the build was automatically triggered and completed successfully.
Use your file browser and copy-paste the IInAppBillingService.aidl into /app/src/main/aidl/com/android/vending/billing/
The problem was actually in the version Android Studio 1.3 updated from the canary channel. I updated my studio to 1.3 and got the same error but reverting back to studio 1.2.1 made my project run fine.
buildtools layout in 23.0.0.rc2 was reverted
so to be able to use it, you need to upgrade the plugin to 1.3.0-beta2 or higher as i show below:
I am working with sdk 23.1.0 and gradle 1.3.1. I created a new project edited nothing and got the aidl error. I went into my project gradle file and changed tool to 22.0.1 instead of 23.1.0 and it worked:
compileSdkVersion 23
buildToolsVersion "22.0.1" //"23.1.0"
Check if you actually have installed the buildVersionTools you are using. In my case I tried 25.0.1 whilst I only had 25.0.2.
To check it go to the SDK Manager, clicking the icon:
Then click Launch Standalone SDK Manager at the bottom:
Now check whatever you need and install packages.
Hope it helps!

Categories

Resources