Reputation: 14390
I'am trying to add Google Analytics
to my application
I've followed every step at this page
https://developers.google.com/analytics/devguides/collection/android/v4/#tracking-methods
the issue is Eclipse
not recognized Tracker
and GoogleAnalytics
the Google play service
and every thing are installed from SDK
I've tried to search for V4 Analytics SDK
i could't find it
i don't know if i mess something here
any advice ?
Upvotes: 3
Views: 2134
Reputation: 11829
In Android Studio you need to add the google play services as dependency to gradle. For example:
compile 'com.google.android.gms:play-services:6.5.87'
After that click the Sync Project with Gradle Files icon and it should work.
Upvotes: 0
Reputation: 14390
Finally found the solution ..
Google Analytics V4
has no SDK , its depends on Google Play Services SDK
So here is what i did :
Google Play Services SDK
from Android SDK(/extras/google/google_play_services/libproject/ )
google-play-services_lib
) <- thats what we needgoogle-play-services_lib
) as LibraryAdd
and select google-play-services_lib
Now you've done you can use Google Analytics V4
with no problems at all
The Idea is you need to download and import Google Play Services
to Eclipse then add the library to your project .
enjoy coding ..
Upvotes: 8