use*_*977 4 android android-studio
我将android studio从版本1.0更新到1.2.1,当我开始我的第一个应用程序时,它出现了.
错误:任务':app:compileDebugAidl'的执行失败.
aidl不见了
我确保所有sdk都是最新的.这是我的gradle构建代码.
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'
}
}
Run Code Online (Sandbox Code Playgroud)
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.android.support:appcompat-v7:22.2.0'
}
Run Code Online (Sandbox Code Playgroud)
AndroidStudio-1.3-Preview似乎正在使用gradle插件的意外版本.(至少在你创建一个全新的项目时)
同样,如果您使用以下方法打开现有项目:
--->你可能会遇到这个奇怪的错误:"aidl缺失"(即使在没有使用aidl的项目中!)
解:
一定要使用最新的android-gradle-plugin(在root build.gradle中):
classpath 'com.android.tools.build:gradle:1.3.0-beta1'
Run Code Online (Sandbox Code Playgroud)
在buildscript - > dependencies下.
示例:
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
}
}
Run Code Online (Sandbox Code Playgroud)
和最新的构建工具(在模块build.gradle中):
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc1"
... }
Run Code Online (Sandbox Code Playgroud)
请注意,使用此配置,您正在使用最新的构建工具 - 尚未发布 - 以及Android-M的预览--->事情可能不稳定
我有同样的错误.我将gradle脚本中的构建工具版本更改为我在sdk管理器中找到的实际sdk构建工具版本,并且这样做了.
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
Run Code Online (Sandbox Code Playgroud)
...
| 归档时间: |
|
| 查看次数: |
5210 次 |
| 最近记录: |