0

I got above error after ionic cordova run android every time I tried this :

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

in the build.gradle

Downgrade google service version to 3.2.1

classpath 'com.google.gms:google-services:3.2.1'

at the bottom of your build.gradle the following can be added to work around the issue:

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

But nothing is worked for me please tell me how to fix?

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' } // Fabrics Maven repository from cordova-plugin-firebase
        maven {
            url "https://maven.google.com"
        }
    }

    // Switch the Android Gradle plugin version requirement depending on the
    // installed version of Gradle. This dependency is documented at
    // http://tools.android.com/tech-docs/new-build-system/version-compatibility
    // and https://issues.apache.org/jira/browse/CB-8143
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
        classpath 'com.google.gms:google-services:4.1.0' // google-services dependency from cordova-plugin-firebase
        classpath 'io.fabric.tools:gradle:1.25.4' // fabric dependency from cordova-plugin-firebase
    }
}


dependencies {
    implementation fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: "CordovaLib"))
    compile "com.squareup.okhttp3:okhttp-urlconnection:3.10.0"
    compile "com.android.support:support-v4:24.1.1+"
    compile "com.android.support:support-v4:27+"
    compile "com.android.support:support-v4:25.+"
    compile "com.android.support:appcompat-v7:25.+"
    compile "com.google.android.gms:play-services-tagmanager:+"
    compile "com.google.firebase:firebase-core:+"
    compile "com.google.firebase:firebase-messaging:+"
    compile "com.google.firebase:firebase-config:+"
    compile "com.google.firebase:firebase-perf:+"
    compile "com.google.android.gms:play-services-maps:15.0.1"
    compile "com.google.android.gms:play-services-location:15.0.1"
    compile "com.android.support:support-core-utils:27.+"
    compile "com.google.android.gms:play-services-location:11+"
    compile "com.android.support:support-v4:26+"
    compile "com.android.support:appcompat-v7:26+"
    compile "com.google.android.gms:play-services-location:15.+"
    compile "com.android.support:appcompat-v7:23+"
    compile "com.android.support:support-v4:26.+"
    compile "com.android.support:appcompat-v7:26.+"
    // SUB-PROJECT DEPENDENCIES END
}

project.properties
  target=android-26
  android.library.reference.1=CordovaLib
  cordova.system.library.1=com.squareup.okhttp3:okhttp-urlconnection:3.10.0
  cordova.system.library.2=com.android.support:support-v4:24.1.1+
  cordova.system.library.3=com.android.support:support-v4:27+
  cordova.system.library.4=com.android.support:support-v4:25.+
  cordova.system.library.5=com.android.support:appcompat-v7:25.+
  cordova.gradle.include.1=cordova-plugin-firebase/managment-build.gradle
  cordova.system.library.6=com.google.firebase:firebase-core:16.0.8
  cordova.system.library.7=com.google.firebase:firebase-messaging:17.6.0
  cordova.system.library.8=com.google.firebase:firebase-config:16.5.0
  cordova.system.library.9=com.google.firebase:firebase-perf:16.2.5
  cordova.gradle.include.2=cordova-plugin-googlemaps/managment-tbxml-android.gradle
  cordova.system.library.11=com.google.android.gms:play-services-maps:15.0.1
  cordova.system.library.12=com.google.android.gms:play-services-location:15.0.1
  cordova.system.library.13=com.android.support:support-core-utils:27.+
  cordova.system.library.14=com.google.android.gms:play-services-location:11+
  cordova.system.library.15=com.android.support:support-v4:26+
  cordova.system.library.16=com.android.support:appcompat-v7:26+
  cordova.gradle.include.3=cordova-plugin-mauron85-background-geolocation/managment-dependencies.gradle
  cordova.system.library.17=com.google.android.gms:play-services-location:15.+
  cordova.system.library.18=com.android.support:appcompat-v7:23+
  cordova.gradle.include.4=cordova-plugin-telerik-imagepicker/managment-ignorelinterrors.gradle
  cordova.gradle.include.5=cordova-plugin-telerik-imagepicker/managment-androidtarget.gradle
  cordova.system.library.19=com.android.support:support-v4:26.+
  cordova.system.library.20=com.android.support:appcompat-v7:26.+
Kapil soni
  • 873
  • 2
  • 10
  • 26

1 Answers1

0

Just change in

platforms/android/project.properties

You should specify the target version instead of + for the plugin that is creating problem, in my case it was Firebase so following are my changes:

Earlier

# Project target.
target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.gradle.include.1=cordova-plugin-firebase/affeedback-build.gradle
cordova.system.library.1=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.2=com.google.firebase:firebase-core:+
cordova.system.library.3=com.google.firebase:firebase-messaging:+
cordova.system.library.4=com.google.firebase:firebase-config:+
cordova.system.library.5=com.google.firebase:firebase-perf:+
cordova.system.library.6=com.android.support:support-annotations:27.+

Now

# Project target.
target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.android.support:support-v4:23.2.1
cordova.system.library.2=com.google.code.gson:gson:2.3
cordova.system.library.3=commons-io:commons-io:2.4
cordova.system.library.4=com.android.support:support-v4:24.1.1+
cordova.gradle.include.1=cordova-plugin-firebase/fmauser-build.gradle
cordova.system.library.5=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.6=com.google.firebase:firebase-core:16.0.8
cordova.system.library.7=com.google.firebase:firebase-messaging:17.6.0
cordova.system.library.8=com.google.firebase:firebase-config:16.5.0
cordova.system.library.9=com.google.firebase:firebase-perf:16.2.5
cordova.system.library.10=com.android.support:support-annotations:27.+
cordova.gradle.include.2=cordova-support-google-services/fmauser-build.gradle
cordova.system.library.11=com.android.support:support-v4:27.+
cordova.gradle.include.3=phonegap-plugin-barcodescanner/fmauser-barcodescanner.gradle
cordova.gradle.include.4=cordova-android-support-gradle-release/fmauser-cordova-android-support-gradle-release.gradle

Please use the following release notes to see the exact version of every plugin . link1, link2, link3.

Hope this helps!

  • got same error again : The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies. – Kapil soni May 08 '19 at 05:43
  • check our updated fiddle in which we have update my project.properties – Kapil soni May 08 '19 at 05:48
  • 1
    sorry for a late response please use the following release notes to see the exact version of every plugin . https://developers.google.com/android/guides/setup . https://developers.google.com/android/guides/releases . https://firebase.google.com/support/release-notes/android. In case this helps please check it as correct answer. Thank you – Ankit Chaudhary May 10 '19 at 13:47
  • Sir yesterday i have fixed the above issue and we have customize our project.properties accodring to firebase notes as well as goolge-play-servcies version and i found above links yesterday.i will correct only above comment not answer. – Kapil soni May 11 '19 at 03:05
  • It's just that if it has pointed you in the right direction to edit project.properties correctly, it might help others as well who are looking for the same solution by seeing the solution as a correct answer. Anyhow I have edited the answer and have pasted the links to the versions of various plugins that needs to be exactly specified. Have a great day – Ankit Chaudhary May 13 '19 at 06:47
  • Worked for me ! I just changed above four firebase services. – Akash Arora May 15 '19 at 08:13