3
votes

I am trying to add Google Analytics into an Ionic/ phonegap/ Covdova app using this. However, I am getting these errors:

A problem occurred configuring root project 'android'. Could not resolve all dependencies for configuration ':_debugCompile'. Could not find any version that matches com.google.android.gms:play-service s-analytics:+. Searched in the following locations: https://repo1.maven.org/maven2/com/google/android/gms/play-services-ana lytics/maven-metadata.xml https://repo1.maven.org/maven2/com/google/android/gms/play-services-ana lytics/ Required by: :android:unspecified

I have Android SDK and Google Play service installed. I even try to use the older version it mentioned in the document: cordova plugin add [email protected] but that gives the same error.

2

2 Answers

3
votes

I had the same problem and found the answer in this comment.

Running android and then installing/updating

  • Android Support Repository
  • Android Support Library
  • Google Play Services
  • Google Repository

fixed the problem for me.

It sounds like several people also had to change the plugin version

cordova plugin add [email protected]

but I didn't have to do this.

0
votes

try removing platform and add it again,

ionic platform rm android

ionic platform add android

this trick worked for me.