【发布时间】: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