4

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

そして、ここに私のGradleファイルがあります

Build.Gradle-> アプリ

  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-> プロジェクト

     // 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 
}

誰でもエラーの内容を教えてもらえますか? また、Cloud Messaging に Firebase-core の要件はありますか? ありがとう

4

4 に答える 4

9

Google リポジトリ、リビジョン 27 を更新/インストールする必要があります

この回答を確認してください:Androidでのfirebaseのセットアップ

于 2016-05-31T08:33:59.417 に答える
8

「com.google.firebase:firebase-ads:9.0.1」で同じ問題が発生しました。SDK Manager Google Repository Extra からインストールしました。

于 2016-05-29T01:48:26.043 に答える
1

Android SDK マネージャーに移動して更新を確認する必要があります。これらの依存関係を解決する Google Play サービス SDK の更新が表示されるはずです。

于 2016-05-28T17:22:23.697 に答える
0

Mac OS ユーザーの場合、SDK の更新の一環として、ADK を brew の有無にかかわらずインストールした場合は、Android スタジオでの ADK のパスが正しいことを確認してください。私の問題は、Androidスタジオが独自に古いパスに戻ったことです。

于 2016-06-27T08:48:11.593 に答える