Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while adding Google Analytics

I tried to add Google Analytics v4.0 via Google Play Services to my android project.

The compiler shows an error in global_tracker.xml and says:

...
<screenName name="com.google.android.gms.analytics.samples.mobileplayground.ScreenviewFragment">
        AnalyticsSampleApp ScreenViewSampleScreen
</screenName>
...

Error: Found tag screenName where item is expected

like image 644
AVEbrahimi Avatar asked Dec 04 '22 05:12

AVEbrahimi


1 Answers

Found the problem:

global_tracker.xml was copied to res/values folder, while should be copied to res/xml folder

like image 158
AVEbrahimi Avatar answered Dec 10 '22 11:12

AVEbrahimi