2

Final solution

I'm just an idiot. Real problem after increasing version was, I had apply plugin not in the end of file. Check this topic, I was searching badly before


Original question

I never understand how Gradle works, so sorry for stupid questions.

I'm facing a problem and I have no idea what is wrong and what to do now. I have app with GCM and everything worked fine until we added second language for app.

Then I get error, that google_app_id is not translated - found that this is fixed in newer version of GCM package and I updated it to newer one. Now I get 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 8.3.0.

But I updated it from 8.3.0 to 8.4.0 because of error with translation. My build.gradle files are like this

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

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile "com.google.android.gms:play-services-gcm:8.4.0"
    compile 'com.google.code.gson:gson:2.4'
    compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
    compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }
    compile 'org.apmem.tools:layouts:1.10'
}

and

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.google.gms:google-services:2.0.0-alpha6'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

Thank you

Community
  • 1
  • 1
Arxeiss
  • 976
  • 16
  • 34

1 Answers1

0

This kind of issue happens when lint finds a string that is not traslated in all languages. It should be fixed since 2.0.0-alpha3.

You can use some workarounds:

You can disable the MissingTranslation in your build.gradle file.

buildTypes { 
     release { 
          lintOptions { 
              disable 'MissingTranslation' 
          } 
      } 
} 

Pay attention because it will disable all MissingTranslation error.

Otherwise you can use a lint.xml file with:

<lint>
    <issue id="MissingTranslation">
        <ignore regexp="google_app_id"/>
    </issue>
</lint>
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • Thank you, that is reason why I tried 2.0.0-alpha6, but then I face different problem.. Should I downgrade back and use that for ignore MissingTranslation error? – Arxeiss Apr 04 '16 at 07:22
  • I would not downgrade the version. Try to use the ignore with the alpha6. – Gabriele Mariotti Apr 04 '16 at 12:42