【发布时间】:2018-07-31 17:25:40
【问题描述】:
我有关注 app/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
...
minSdkVersion 19
targetSdkVersion 27
...
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.github.IntruderShanky:scatter-piechart:1.0.0'
implementation 'com.etsy.android.grid:library:1.0.5'
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
implementation 'com.google.zxing:core:3.3.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
并关注 project/build.grade
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:3.2.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
当我将鼠标悬停在 firebase 实现上方时,我会收到以下警告
implementation 'com.google.firebase:firebase-messaging:11.8.0'给我看
com.google.firebase:firebase-messaging 比 11.8.0 更新的版本 可用:17.1.0
和implementation 'com.google.firebase:firebase-core:11.8.0' 告诉我
com.google.firebase:firebase-core 比 11.8.0 更新的版本 可用:16.0.1
然后我进行建议并将我的实现更新为可用版本,如下所示
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
和sync 我的项目。但是该项目向我显示了以下错误
无法解决:play-services-base 打开文件
无法解决:play-services-tasks 打开文件
无法解决:play-services-stats 打开文件
无法解决:play-services-ads-identifier 打开文件
无法解决:play-services-basement 打开文件
我正在尝试解决它很长时间,但没有任何效果。请帮我解决它!
【问题讨论】:
标签: android firebase gradle android-gradle-plugin google-play-services