Gradle不针对Firebase云消息进行编译 [英] Gradle not compiling for Firebase Cloud Messaging
问题描述
我注意到Firebase API已从v 9.0.0升级到v 9.0.1,因此决定改变这种情况。
然而,它并未引起注意。 / p>
这是Gradle Logcat中的错误
错误:(25, 13)无法解析:com.google.firebase:firebase-messaging:9.0.1
错误:(26,13)无法解析:com.google.firebase:firebase-core:9.0.1
这里是我的Gradle文件
Build.Gradle - > App
apply plugin:'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion23.0.3
defaultConfig {
applicationIdcom.example.lifeline.applicationgreat
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName1.0
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt' ),'proguard-rules.pro'
}
}
}
依赖项{
编译fileTree(dir:'libs',include:[ '* .jar'])
testCompile'junit:junit:4.12'
compile'com.android.support:appcompat-v7:23.4.0'
compile'com.google.firebase :firebase-messaging:9.0.1'
compile'com.google.firebase:firebase-core:9.0.1'
}
apply plugin:'com.google。 gms.google-services'
Build.Gradle-> Project
//顶级构建文件,您可以在其中添加对所有子项目/模块通用的配置选项。
$ b buildscript {
repositories {
jcenter()
}
依赖关系{
classpath'com.android.tools.build:gradle: 2.1.0'
classpath'com.google.gms:google-services:3.0.0'
//注意:不要在这里放置您的应用程序依赖项;它们属于单个模块build.gradle文件中的
//
}
}
allprojects {
存储库{
jcenter()
任务清理(类型:删除){
删除rootProject.buildDir
}
任何人都可以告诉错误是什么或者我是否缺少任何东西。
此外,是否有任何Firebase-core云消息传递的要求?
Thanks
我对com.google.firebase:firebase-ads:9.0.1 ,我所做的是从SDK Manager Google Repository Extra安装。
I noticed that Firebase APIs have upgraded from v 9.0.0 to v 9.0.1 and so decided to change that.
However it is not getting noticed.
Here is the Error in Gradle Logcat
Error:(25, 13) Failed to resolve: com.google.firebase:firebase-messaging:9.0.1
Error:(26, 13) Failed to resolve: com.google.firebase:firebase-core:9.0.1
And here are my Gradle Files
Build.Gradle-> App
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.lifeline.applicationgreat"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.firebase:firebase-messaging:9.0.1'
compile 'com.google.firebase:firebase-core:9.0.1'
}
apply plugin: 'com.google.gms.google-services'
Build.Gradle-> Project
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
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
}
Can Anyone tell whats the Error or if I am Missing anything. Also Is there any requirement of Firebase-core for Cloud Messaging? Thanks
I had the same issue with "com.google.firebase:firebase-ads:9.0.1", what I did was install from de SDK Manager Google Repository Extra.
这篇关于Gradle不针对Firebase云消息进行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!