I\'ve set all things for google analytics api v4 as it mentioned here:
https://developers.google.com/analytics/devguides/collection/android/v4/
and here:
The problem according to @stkent answer is that the AppViewBuilder()
is deprecated so you can fix your problem by deleteing this line of code that's what you need in your case
And to help people that have same problem after following this
delete this line of code
tracker.send(new HitBuilders.AppViewBuilder().build());
and add this instead
@Override
protected void onStart() {
super.onStart();
GoogleAnalytics.getInstance(this).reportActivityStart(this);
}
@Override
protected void onStop() {
super.onStop();
GoogleAnalytics.getInstance(this).reportActivityStop(this);
}
in each activity you want to track
additional info from google doc about those 2 method
reportActivityStop
reportActivityStart
using this with auto tracking is a noop so you can disable it
the original answer is for @skent on this post