cmackay / google-analytics-plugin

Cordova Google Analytics Plugin for Android & iOS
Apache License 2.0
89 stars 43 forks source link

Invalid use of Google Play Services (+ a workround how to fix it) #67

Closed Ziv-Barber closed 8 years ago

Ziv-Barber commented 8 years ago

On build.gradle:

Change:

dependencies { compile fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START ... compile "com.google.android.gms:play-services:+" // SUB-PROJECT DEPENDENCIES END }

To:

dependencies { compile fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DDDEPENDENCIES START ... // compile "com.google.android.gms:play-services:+" compile "com.google.android.gms:play-services-analytics:+" // SUB-PROJECT DDDEPENDENCIES END }

It's NOT possible to add ALL of Google Play Services.... so we must add only play-services-analytics.

cmackay commented 8 years ago

Actually, I had looked at this some more and I can't reproduce it. Maybe it is an old version of the plugin you are using. When I add the plugin to a clean project the build.gradle has

compile "com.google.android.gms:play-services-analytics:+"