-1

И я новичок в Android Studio, поэтому я не понимаю. Я новичок в Push Notification, используя FCM, но я не получаю решение. Я получаю этот тип ошибки во время выполнения.Push-уведомление с использованием FCM в android

Error:Execution failed for task ':app:processDebugGoogleServices'. 
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.6.0. 

My App/Gradle

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 24 
buildToolsVersion "24.0.1" 
defaultConfig { 
    applicationId "info.androidhive.firebasenotifications" 
    minSdkVersion 15 
    targetSdkVersion 19 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
// compile fileTree(dir: 'libs', include: ['*.jar']) // old default 
compile fileTree(dir: 'libs', include: '*.jar') 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:24.0.0-beta1' 
testCompile 'junit:junit:4.12' 

compile 'com.google.firebase:firebase-messaging:9.6.0' 
compile 'com.google.android.gms:play-services:7.5.0' 
} 

// ADD THIS AT THE BOTTOM 
apply plugin: 'com.google.gms.google-services' 

Это мой проект Gradle

buildscript { 
repositories { 
    jcenter() 
} 
dependencies { 
// classpath 'com.android.tools.build:gradle:2.2.3' 
//  classpath 'com.google.gms:google-services:3.0.0' 

    classpath 'com.android.tools.build:gradle:2.2.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() 
} 
} 

task clean(type: Delete) { 
delete rootProject.buildDir 
    } 

я не имею обновление Android Studio SDK ничего налево с моей стороны, но я не знаю, где я делаю ошибка. Так что, пожалуйста, помогите мне в этом.

+2

ошибка Пояснения у вас есть GMS 7.5.0 в вашем Gradle – Selvin

+0

@Selvin так, что мне делать? –

+4

измените его на ту же версию, что и firebase ... Что вы не поняли в: * Исправьте конфликт версии либо путем обновления версии плагина google-services (информация о последней версии доступна по адресу https: // bintray .com/android/android-tools/com.google.gms.google-services /) или обновить версию com.google.android.gms до 9.6.0. * – Selvin

ответ

2

Ваша версия gms - 7.5.0, измените ее на ту же версию, что и версия firebase, или вы можете обновить обе версии до последней версии.

Обновите firebase и играть-сервисы до версии 10.2.0 в модуле приложения файл build.gradle

compile 'com.google.firebase:firebase-core:10.2.0' 
compile 'com.google.android.gms:play-services:10.2.0' 
+0

Извините, это не работает для меня –

+0

Вы очистили ваш проект и восстановите его. ? – Aryan

+0

каждый раз, когда первый очищает и восстанавливает проект –