2016-11-24 82 views
1

我將我的項目從android studio版本2.1.2導入到2.2。它在我以前的android版本中完美工作,但在android studio 2.2中拋出錯誤。解決這個錯誤之後已經發布了很多,解決了一天之後沒有解決方案爲我工作。我在這裏做了什麼錯誤。java.lang.IllegalStateException:aidl缺失

Error:Execution failed for task ':app:compileDebugAidl'. 
> java.lang.IllegalStateException: aidl is missing 

我的項目級的build.gradle文件 //頂級構建文件,您可以添加常用的配置選項,所有子項目/模塊。 buildscript {

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:[email protected]' 
compile 'com.ogaclejapan.smarttablayout:utils-v4:[email protected]' 
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' 
} 
+0

變化與類路徑「com.android.tools.build:gradle:2.2.2」的的build.gradle – Nithinlal

+0

嘗試重新安裝插件的gradle低 – SaravInfern

+0

低於24的buildToolsVersion,其中U在你的SDK – Nithinlal

回答

0

改變你從buildToolsVersion 「24.0.0」,以buildToolsVersion 「23.0.3」,因爲你的compileSdkVersion是23由@建議鋼鐵俠。

項目中的水平gradle這個文件改變 類路徑 'com.android.tools.build:gradle:2.1.2' 到 類路徑 'com.android.tools.build:gradle:2.2.2'

而且

我這樣做了。

希望它有幫助。

+0

我改變了@ironman建議的一切,但仍然拋出相同的錯誤。 –

+0

如果您尚未找到任何解決方案,請參閱此鏈接。 http://stackoverflow.com/questions/29766830/execution-failed-for-task-appcompiledebugaidl-aidl-is-missing – Rohit45