【问题标题】:aidl is missing in Android StudioAndroid Studio 中缺少aidl
【发布时间】:2015-09-03 01:56:28
【问题描述】:

我正在尝试使用 Android SDK 版本 6.0,API 23 为 Android 运行 Sample of Google Cloud Messaging 现在该示例使用了 API 22,但我想为 API 23 运行,所以我在应用程序级别的 built.gradle 文件中所做的更改如下。

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 'Google Inc.:Google APIs:23'
    buildToolsVersion '23.0.0'

    defaultConfig {
        applicationId "gcm.play.android.samples.com.gcmquickstart"
        minSdkVersion 9
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'LICENSE.txt'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.gms:play-services-gcm:7.8.0'
    compile 'com.android.support:appcompat-v7:23.0.0'
    // Testing dependencies
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.1'
    androidTestCompile 'com.android.support.test:runner:0.2'
    androidTestCompile 'com.android.support:support-annotations:23.0.0'
}

我将 Android Studio 更新到最新版本,但现在出现以下错误。

:app:compileDebugAidl FAILED
Error:Execution failed for task ':app:compileDebugAidl'.
> aidl is missing

对于链接中给出的解决方案,我尝试了updating android studio

【问题讨论】:

  • 不确定这是否重要,但compileSdkVersion 不应该只是23吗?

标签: android android-studio gradle google-cloud-messaging


【解决方案1】:

为了解决这个问题,我首先将构建工具更改为 23.0.1,如下所示:

compileSdkVersion 23
buildToolsVersion "23.0.1"

我的 targetSdkVersion 也是 23。

并在顶层脚本中更新这些参数:

    classpath 'com.android.tools.build:gradle:1.3.0'
    classpath 'com.google.gms:google-services:1.3.0-beta1'

希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-08
    相关资源
    最近更新 更多