Build Error : com.google.android.gms:play-services-measurement-base

Im trying to build an apk with: ionic cordova build android
> 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.

Running the command ionic cordova plugin gives me:

cordova-plugin-device 2.0.2 "Device"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 3.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"

Can someone help me? Thanks :slight_smile:

This is works for me.
1: Remove ionic cordova plugin remove cordova-plugin-firebase.
2: Install: ionic cordova plugin add https://github.com/dpa99c/cordova-plugin-firebase#GH-1057-April-05-android-build-issue
3: rm -rf node_modules/ plugins/ platforms/android package-lock.json
4: npm install
5: ionic cordova platform add android.
6: ** ionic cordova build android**

1 Like

Getting error like this :
Failed to fetch platform https://github.com/dpa99c/cordova-plugin-firebasex#GH-1057-April-05-android-build-issue
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code 1
npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE checkout GH-1057-April-05-android-build-issue
npm ERR! error: pathspec ‘GH-1057-April-05-android-build-issue’ did not match any file(s) known to git
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ANDRIAN\AppData\Roaming\npm-cache_logs\2019-09-22T13_20_05_358Z-debug.log