相关疑难解决方法(0)

错误:(27,13)无法解决:com.google.firebase:firebase-core:9.8.0

我正在尝试在我的应用中使用Firebase.

向Gradle添加三行后,我收到此错误:

错误:(27,13)无法解决:com.google.firebase:firebase-core:9.8.0

以下是我的代码的一些图像:

这是在Gradle应用程序中 这是别的 这是在Gradle应用程序中

为什么我收到此错误?

android gradle android-studio

14
推荐指数
2
解决办法
7812
查看次数

android上的firebase设置

我无法在android studio上设置firebase的更新版本.我已经在站点firebase上创建了项目的json文件,并将其复制到项目中并在gradle中处理行后:

buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.0.0'
    }
}
apply plugin: 'com.android.application'
android {
  // ...
}
dependencies {
  compile 'com.google.firebase:firebase-core:9.0.1'
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

failed to resolve: compile 'com.google.firebase:firebase-core:9.0.0'

我该如何解决?

android firebase android-studio build.gradle

8
推荐指数
1
解决办法
7034
查看次数

Gradle未编译Firebase云消息传递

我注意到Firebase API已从v 9.0.0升级到v 9.0.1,因此决定更改它.

然而,它没有被注意到.

这是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
Run Code Online (Sandbox Code Playgroud)

这是我的Gradle文件

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'
Run Code Online (Sandbox Code Playgroud)

Build.Gradle-> Project

     // Top-level build …
Run Code Online (Sandbox Code Playgroud)

android gradle firebase-cloud-messaging

4
推荐指数
2
解决办法
9365
查看次数