I'm trying to get the libGoogleAnalyticsV2.jar imported to my project in Android Studio. First I added it using the Project Structure which corrected any red lines when trying to use EasyTracker. But when I compiled it resulted with errors and the build failed.
Gradle: package com.google.analytics.tracking.android does not exist
Gradle: cannot find symbol variable EasyTracker
Gradle: cannot find symbol variable EasyTracker
I'm using the lib like this:
EasyTracker.getInstance().activityStart(this);
What can I do to make this work? Thanks
You need to reference the jar in the build.gradle, something like this:
dependencies {
....
compile files('libs/libGoogleAnalyticsV2.jar')
libs
in this case being the libs dir in your project, above src
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With