2016-09-24 6 views
6

は、コンパイル時に、私はまだ次のエラーを取得するFBのドキュメントhereしかし に応じてすべてをした:は解決に失敗しました:com.google.firebase:firebaseコア:9.6.0

Error:(44, 13) Failed to resolve: com.google.firebase:firebase-core:9.6.0 

マイSDKマネージャがいることを言いますすべてが最新のものである:

Google Play services Rev. 33 installed 
Google Repository Rev. 35 installed 

は、これは私のbuild.gradleのコンテンツです:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion '23.0.3' 

    defaultConfig { 
     applicationId "xxxx.xxxx" 
     minSdkVersion 16 
     targetSdkVersion 23 
     versionCode 14 
     versionName "1.0" 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    // Support libraries 
    compile 'com.android.support:appcompat-v7:23.1.1' 
    compile 'com.android.support:design:23.1.1' 
    // Google APIs 
    // Note: Avoid compiling the entire play-services package. 
    compile 'com.google.android.gms:play-services-gcm:9.4.0' 
    compile 'com.google.android.gms:play-services-location:9.4.0' 
    compile 'com.google.android.gms:play-services-maps:9.4.0' 
    compile 'com.google.android.gms:play-services-places:9.4.0' 
    compile 'com.google.maps.android:android-maps-utils:0.4.4' 

    compile 'org.jsoup:jsoup:1.9.2' 
    compile 'com.google.code.gson:gson:2.7' 
    compile 'io.branch.sdk.android:library:2.+' 
    compile 'com.google.firebase:firebase-core:9.6.0' //<-- CAUSING TROUBLE 
} 

apply plugin: 'com.google.gms.google-services' 

これは私のルートレベルbuild.gradleコンテンツです:

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.1.3' 
     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() 
    } 
} 

なぜコンパイルされていませんか?

答えて

2

こと@Lorenzo Quiroliが提供する代わりにcompile 'com.google.firebase:firebase-core:9.6.0'

5

FirebaseとGoogle Playサービスの同じバージョンを使用する必要があります。あなたはSDK Firebase 9.6.0にアップデートしたいのであれば、あなたはまた、他の依存関係を更新する必要があります

compile 'com.google.android.gms:play-services-gcm:9.6.0' 
compile 'com.google.android.gms:play-services-location:9.6.0' 
compile 'com.google.android.gms:play-services-maps:9.6.0' 
compile 'com.google.android.gms:play-services-places:9.6.0' 
7

答えはおそらくあなたが必要とする、あなたを助けるcompile 'com.google.firebase:firebase-messaging:9.4.0'をお試しください同じバージョンのFirebaseとGoogle Playサービス。

私の場合、すべてが9.6.0に設定されていましたが、まだエラーが発生していました。私は、SDK Managerを介して最新のGoogleプレイ・サービスとGoogleのリポジトリに更新することで、それを解決:

enter image description here

は、今私はあなたがすでにこれらを更新していたので、これはあなたを助けにはなりません知っているが、それは役立つかもしれません他の誰か。

関連する問題