这个问题在这里已经有了答案:
aidl is missing android studio
(7 个回答)
5年前关闭。
我将我的项目从 android studio 版本 2.1.2 导入到 2.2。它在我的旧 android 版本中运行良好,但在 android studio 2.2 中抛出错误。在工作了一天后,这个错误的解决方案已经发布了很多,没有一个解决方案对我有用。我在这里做错了什么。
Error:Execution failed for task ':app:compileDebugAidl'.
> java.lang.IllegalStateException: aidl is missing
我的项目级 build.gradle 文件是
//顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项。
构建脚本 {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我的模块级 build.gradle 是
apply plugin: 'com.android.application'
android {
defaultConfig {
applicationId "com.ujjwalmainali.univhub"
minSdkVersion 16
targetSdkVersion 23
versionCode 6
versionName "1.0"
}
compileSdkVersion 23
buildToolsVersion "24.0.0"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url "https://raw.githubusercontent.com/smilefam/SendBird-SDK Android/master/" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
//iconify dependencies
//iconify
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
// (v4.5)
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.sendbird.sdk:sendbird-android-sdk:3.0.7'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:cardview-v7:23.0.+'
compile 'com.android.support:recyclerview-v7:23.0.+'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.3'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.googlecode.json-simple:json-simple:1.1'
compile 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
compile 'com.google.firebase:firebase-core:9.2.0'
compile 'com.google.firebase:firebase-messaging:9.2.0'
compile 'com.google.firebase:firebase-analytics:9.2.0'
compile 'com.google.android.gms:play-services-ads:9.2.0'
compile 'com.applozic.communication.uiwidget:mobicomkitui:4.63'
//app crash report
compile 'ch.acra:acra:4.9.0'
ext.googlePlayServicesVersion = '9.0.2'
ext.supportLibraryVersion = '23.1.1'
provided 'org.glassfish:javax.annotation:10.0-b28'
apply plugin: 'com.google.gms.google-services'
}
最佳答案
将您的 buildToolsVersion "24.0.0"更改为 buildToolsVersion "23.0.3"因为您的 compileSdkVersion 是 23,正如@Ironman 所建议的那样。
同样在您的项目级 gradle 文件中更改
类路径 'com.android.tools.build:gradle:2.1.2' 到
类路径'com.android.tools.build:gradle:2.2.2'
我是这样解决的。
希望能帮助到你。!
关于android - java.lang.IllegalStateException :aidl is missing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40779629/