java.lang.IllegalStateException : aidl is missing Android Studio 3. 0

标签 java android gradle android-gradle-plugin

我拥有 android studio 3.0 中所有 sdks 和构建工具的最新版本,但我不断收到此 aidl 丢失错误。

这是项目级别和应用程序级别的 gradle 文件。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'
    defaultConfig {
        applicationId "com.example.ibraheem.tesst"
        minSdkVersion 23
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:support-vector-drawable:25.3.1'
}

//顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项。

buildscript {

    repositories {
        maven { url 'https://maven.google.com' }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-alpha1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

最佳答案

构建工具、平台工具和工具必须位于同一个 API 上。

我猜在 android studio 3 platform-tools 上是 Api 26 ,将您的 Build-tools 版本更改为 Api 26

关于java.lang.IllegalStateException : aidl is missing Android Studio 3. 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44090183/

相关文章:

java - 用于 Eclipse 和运行 Glassfish 的 GlassFish 工具包问题

android - 改造不适用于应用程序的发布版本

android - 三星 S3 原生相机的奇怪问题导致结果崩溃

android - 如何为多个 Android 项目使用相同的 build.gradle 文件(无需复制/粘贴)

java - 将 Java 源代码与字节码进行比较

java - 当一个类从抽象类扩展时,如何访问它的私有(private)变量?

java - 在一定时间段后中断未知的长时间运行的函数

testing - 如何在 Gradle Liquibase 插件的 runList 字段中包含多个事件?

java - 如何将 gradle 库依赖项添加到 codenameone 项目

java - Eclipse org.eclipse.core.resources java.lang.NoClassDefFoundError : sun/misc/BASE64Encoder