0
votes

I am getting this error

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.4.0.

I don't know what is going wrong. I have also included the plugin apply plugin: 'com.google.gms.google-services'

Still I can't get rid of it.

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "24.0.2"

defaultConfig {
    applicationId "com.example.raghav.AurinkoInfotech"
    minSdkVersion 21
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.google.android.gms:play-services-ads:10.2.0'
compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.google.android.gms:play-services-gcm:10.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
}

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

Also if I make it 9.4.0 then it gives me following errors

Error:(16) No resource identifier found for attribute 'itemTextColor' in package 'com.example.raghav.AurinkoInfotech'

Error:(16) No resource identifier found for attribute 'headerLayout' in package 'com.example.raghav.AurinkoInfotech'

Error:(16) No resource identifier found for attribute 'menu' in package 'com.example.raghav.AurinkoInfotech'

Here are my dependencies:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
}

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

Now the errors are as follows:

Error:(16) No resource identifier found for attribute 'itemTextColor' in package 'com.example.raghav.AurinkoInfotech'

Error:(16) No resource identifier found for attribute 'headerLayout' in package 'com.example.raghav.AurinkoInfotech'

Error:(16) No resource identifier found for attribute 'menu' in package 'com.example.raghav.AurinkoInfotech'

Error:(3) No resource identifier found for attribute 'layout_behavior' in package 'com.example.raghav.AurinkoInfotech'

Error:(10, 26) No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior').

Error:(3) No resource identifier found for attribute 'layout_behavior' in package 'com.example.raghav.AurinkoInfotech'

Error:(10, 26) No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior').

Error:(18) No resource identifier found for attribute 'headerLayout' in package 'com.example.raghav.AurinkoInfotech'

Error:(18) No resource identifier found for attribute 'menu' in package 'com.example.raghav.AurinkoInfotech'

Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Raghav\AppData\Local\Android\Sdk\build-tools\24.0.2\aapt.exe'' finished with non-zero exit value 1

Have a look at my layout file and see if you find anything

 <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <include
        layout="@layout/app_bar_dashboard"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        android:background="#04867c"
        app:itemTextColor="#fff"
        app:headerLayout="@layout/nav_header_dashboard"
        app:menu="@menu/activity_dashboard_drawer"/>

    </android.support.v4.widget.DrawerLayout>
2

2 Answers

1
votes

all Google services must be same version

compile 'com.google.android.gms:play-services-ads:10.2.0'
compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.google.android.gms:play-services-gcm:10.2.0'
compile 'com.google.android.gms:play-services:10.2.0'

and set

compile 'com.google.firebase:firebase-messaging:9.4.0' -> 10.2.0
1
votes

First thing first,

Change your firebase-messaging version to 10.2.0

One more thing have your added classpath 'com.google.gms:google-services:3.0.0' to your project's gradle? if no - add that one in yout dependencies as well.

Solution of No resource found errors,
you've forgotten to add design library as well,
Add this line in your app.gradle

compile 'com.android.support:design:25.2.0'