Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics with Ionic

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.

like image 512
NaN Avatar asked Dec 02 '25 11:12

NaN


1 Answers

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.

like image 79
user1502723 Avatar answered Dec 05 '25 07:12

user1502723



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!