摇篮code不是建筑:AIDL缺失 [英] Gradle code not building: aidl is missing
问题描述
我更新的Android工作室从版本1.0到1.2.1,当我开始了我的第一个应用程序的出现。
错误:执行失败的任务。':应用程序:compileDebugAidl
AIDL缺少
块引用>我已经确定,所有的SDK是最新的。这是我建立的gradle code。
应用插件:'com.android.application安卓{
compileSdkVersion 22
buildToolsVersion23.0.0 RC1defaultConfig {
的applicationIDcom.example.william.myapplication
17的minSdkVersion
targetSdkVersion 22
版本code 1
的versionName1.0 compileSdkVersion 21}
buildTypes {
发布 {
minifyEnabled假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
}
}}
{相关性
编译文件树(导演:'库',包括:的* .jar)
编译com.android.support:appcompat-v7:22.2.0
}
解决方案似乎AndroidStudio-1.3-preVIEW使用gradle这个插件的意外版本。 (至少当你创建一个全新的项目)
同样,如果您使用打开现有项目:
- 一个旧版本的插件。 (小于1.3.0-β1)
- 最新版本的工具(23.0.0-RC1)
- compileSDK 22
--->你可能有这样的奇怪的错误:(!即使在项目中不使用AIDL)AIDL缺少
解决方案:
请务必使用最新的Android-gradle这个-插件(在根的build.gradle):
类路径com.android.tools.build:gradle:1.3.0-beta1
下buildscript - >依赖
例如:
buildscript {
库{
jcenter()
}
依赖{
类路径'com.android.tools.build:gradle:1.3.0-beta1 //注意:不要在这里把你的应用程序依赖关系;他们属于
//在单个模块的build.gradle文件
}
}和最新版本的工具(模块的build.gradle):
安卓{
compileSdkVersion 22
buildToolsVersion23.0.0 RC1
...}注意,这个配置你正在使用最新版本的工具 - 而不是发布yet-和Android-M的preVIEW --->的东西可能是不稳定
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:
- an older version of the plugin. (<1.3.0-beta1)
- latest build tools (23.0.0-rc1)
- compileSDK 22
---> 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
这篇关于摇篮code不是建筑:AIDL缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!