Issue with .setServiceAccountScopes(AnalyticsScopes.all())

77 views
Skip to first unread message

jres...@forcemktg.com

unread,
Oct 27, 2015, 5:44:56 PM10/27/15
to Google Analytics Reporting API
Hello,
I've been trying to make an Analytics API connection with Java, so I came across the "Hello Analytics API: Java quickstart for service accounts" in this page from the Google Developer site. After following all the directions, I copy/paste the code into Eclipse and pass in my KEY_FILE_LOCATION and SERVICE_ACCOUNT_EMAIL. Eclipse found no errors, so I ran the program and got this error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/api/services/analytics/AnalyticsScopes
at AnalyticsAccess.initializeAnalytics(AnalyticsAccess.java:44)
at AnalyticsAccess.main(AnalyticsAccess.java:23)
Caused by: java.lang.ClassNotFoundException: com.google.api.services.analytics.AnalyticsScopes
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more

All my libraries were imported correctly, so any help with this would be appreciated.
Reply all
Reply to author
Forward
0 new messages