2017-06-23 10 views
7

私は2.3.3に私のAndroidのメーカー、Gradleのバージョン2.3をアップグレードしています、また私のSDKを更新しました - APIレベル26、SDKのビルドツールをFailed to resolve: com.google.firebase:firebase-storage-common:11.0.1が解決に失敗しました:com.google.firebase:firebase-ストレージ共通:11.0.1

build.gradle:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.0' 
    defaultConfig { 
     minSdkVersion 16 
     targetSdkVersion 26 
     multiDexEnabled = true 
    } 

    def applicationVersion = '1.524 20170612' 

    dexOptions { 
     preDexLibraries = false 
     javaMaxHeapSize "2g" 
    } 

    ... 


    useLibrary 'org.apache.http.legacy' 
    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/NOTICE.txt' 
     exclude 'build.gradle' 
     exclude 'build.xml' 
     exclude 'META-INF/jersey-module-version' 
     exclude 'META-INF/NOTICE' 
    } 
    allprojects { 
     tasks.withType(JavaCompile) { 
      options.compilerArgs << "-Xlint:deprecation" 
     } 
    } 
} 

dependencies { 

    compile 'com.fasterxml.jackson.core:jackson-core:2.9.0.pr1' 
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.0.pr1' 
    compile 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr1' 
    compile 'com.android.support:multidex:1.0.1' 

    compile 'com.google.android.gms:play-services:11.0.1' 
    compile 'com.google.android.gms:play-services-base:11.0.1' 
    compile 'com.google.android.gms:play-services-appindexing:9.8.0' 
    compile 'com.google.android.gms:play-services-contextmanager:9.4.0' 
    compile 'com.google.android.gms:play-services-places:11.0.1' 
    compile 'com.google.android.gms:play-services-nearby:11.0.1' 
    compile 'com.google.android.gms:play-services-maps:11.0.1' 
    compile 'com.google.android.gms:play-services-ads:11.0.1' 
    compile 'com.google.android.gms:play-services-auth:11.0.1' 
    compile 'com.google.android.gms:play-services-gcm:11.0.1' 
    compile 'com.google.android.gms:play-services-analytics:11.0.1' 
    compile 'com.google.android.gms:play-services-location:11.0.1' 
    compile 'com.google.maps.android:android-maps-utils:0.4' 
    compile 'com.google.zxing:core:3.2.0' 
    compile 'com.journeyapps:zxing-android-embedded:[email protected]' 
    compile 'com.google.firebase:firebase-messaging:11.0.1' 
    compile 'com.google.firebase:firebase-core:11.0.1' 
    compile 'com.google.firebase:firebase-analytics:11.0.1' 

    compile 'com.flurry.android:analytics:6.4.2' 
    compile 'com.android.support.constraint:constraint-layout:+' 
    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 
+0

こちらをご覧ください(https://firebase.google.com/docs/android/setup)。鉱山はこれらの行でうまくいきました 依存性{ ..... コンパイル 'com.google.firebase:firebase-messaging:9.6.0' 'com.google.firebase:firebase-storage-common:9.6。 0 ' testCompile' junit:junit:4.12 ' 適用プラグイン:' com.google.gms.google-services '//ファイルの末尾 – Nandha

+0

私の質問にお答えいただきありがとうございます。試しましたが、エラーは解決されません。 –

答えて

0

このエラーがスローされます。彼らはいくつかのクラスファイルとメソッドをFirebase pacakgeに移動します。 参考リンクです:https://developers.google.com/android/guides/releases#october_2016_-_version_98 は今build.gradleファイルにいくつかのプロジェクトのリンクを変更する必要があります。

apply plugin: 'com.android.application' 
android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.0' 
    defaultConfig { 
     minSdkVersion 16 
     targetSdkVersion 26 
     multiDexEnabled = true 
    } 

    def applicationVersion = '1.20170612' 
dexOptions { 
    preDexLibraries = false 
    javaMaxHeapSize "2g" 
} 
enter code here 
lintOptions { 
    checkReleaseBuilds false 
    // Or, if you prefer, you can continue to check for errors in release builds, 
    // but continue the build even when errors are found: 
    abortOnError false 

} 

buildTypes { 
    release { 
     minifyEnabled false 
    } 
    debug { 
     minifyEnabled false 
    } 
    } 
} 
dependencies { 
compile project(':paymentGatewayCommons') 
compile project(':paypal') 
compile project(':paytm') 
compile project(':payu') 
compile 'com.fasterxml.jackson.core:jackson-core:2.9.0.pr1' 
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.0.pr1' 
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr1' 
compile 'com.android.support:multidex:1.0.1' 
compile 'com.google.android.gms:play-services-base:11.0.1' 
compile 'com.google.android.gms:play-services-cast-framework:11.0.1' 
compile 'com.google.android.gms:play-services-places:11.0.1' 
compile 'com.google.android.gms:play-services-nearby:11.0.1' 
compile 'com.google.android.gms:play-services-maps:11.0.1' 
compile 'com.google.android.gms:play-services-ads:11.0.1' 
compile 'com.google.android.gms:play-services-auth:11.0.1' 
compile 'com.google.android.gms:play-services-gcm:11.0.1' 
compile 'com.google.android.gms:play-services-analytics:11.0.1' 
compile 'com.google.android.gms:play-services-location:11.0.1' 
compile 'com.google.maps.android:android-maps-utils:0.4.+' 
compile 'com.google.zxing:core:3.2.0' 
compile 'com.journeyapps:zxing-android-embedded:[email protected]' 
compile 'com.google.firebase:firebase-appindexing:11.0.1' 
compile 'com.google.firebase:firebase-messaging:11.0.1' 
compile 'com.google.firebase:firebase-core:11.0.1' 
compile 'com.google.firebase:firebase-analytics:11.0.1' 
compile 'com.flurry.android:analytics:6.4.2' 
compile 'com.android.support.constraint:constraint-layout:+' 


    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 

また、メインプロジェクトのbuild.gradleファイル

dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.3' 
     classpath 'com.google.gms:google-services:3.1.0' 
     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
2

グループcom.google.android.gmsから確認してくださいと私は私のプロジェクトをきれいにすると26、Googleがサービス41、Googleのリポジトリ54

を再生し、私はこのエラーを取得しますグループcom.google.firebaseは同じバージョンです。

たとえば、現在の最新バージョンは11.0.1です。したがって、com.google.android.gmsおよびcom.google.firebaseのすべての依存関係はバージョン11.0.1である必要があります。あなたのdependenciesリストで、次の2は、異なるバージョンを持っています。彼らもバージョン11.0.1を持っていることを確認してください。あなたは がFirebaseアプリケーションのインデックス作成にサービスアプリケーションインデックスをプレイ移行する必要があります

ことを達成するために

。ガイドはhereです。 Google Awareness API v9.6 is missing contextmanager APIによる

Awareness APIに変更されました。それに応じてコードを更新する必要もあります。 GooglePlayServiceパッケージにいくつかの変更が起こっているのため

+0

こんにちはBhalchadraSW、私の質問にお返事ありがとうございます。私のハードディスクのAndroid/sdk/extras/google/m2repository/com/google/androd/gms/play-servies-appindexing:9.8.0が最新のダウンロード版です。 Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-contextmanager:9.4.0も最新のダウンロード版です。 Googleは11.0.1バージョンを提供していません。 –

+0

あなたは[firebase appindexing](https://firebase.google.com/docs/app-indexing/android/migrate)に移行する必要があるため、 – BhalchandraSW

+0

さらにコンテキストマネージャを[認識API](https://developers.google)に移行する必要があると思います.com/awareness/overview) – BhalchandraSW

6

Firebase docに変更すると言う:

Getting a "Could not find" error? Make sure you have the latest Google Repository in the Android SDK manager

あなたは(Linuxの場合)にGoogleリポジトリのバージョンを確認することができますenter image description here

1

この問題を解決する最善の方法は、firebaseをアプリケーションにリンクする手動の方法を使用していません。

これを参照して最新のfirebase repoを追加しようとしました。 Linkです。

それがエラーを示したが、「依存関係の解決に失敗しました」

FireBaseは、Android Studioのバージョン2.2以降のためFireBaseアシスタントの助けを借りて、あなたのアプリにfirebaseを追加することをお勧めします。最新のライブラリをbuild-gradle(モジュール)に手動で追加すると、上記のエラーが発生します。

Firebaseアシスタントを使用することはとても簡単で2段階の処理です。参考までに、上記の「Firebase Assistantの使用」を参照してください。

それは本当に私のAndroidスタジオ2.3で外出しました。3

関連する問題