问题com.google.gdata.util.ResourceNotFoundException:Google Analytic无法找到
问题描述
我正在使用Google分析来显示网站的展示次数/跳出率。 昨天之前function正常。 但现在我收到了一个错误
com.google.gdata.util.ResourceNotFoundException: Not Found Error 404 (Not Found)!!1 *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(https://www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}} 404. That's an error.
The requested URL /analytics/feeds/accounts/default
was not found on this server. That's all we know. at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:599) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536) at com.google.gdata.client.Service.getFeed(Service.java:1135) at com.google.gdata.client.Service.getFeed(Service.java:998) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:645) at com.google.gdata.client.Service.getFeed(Service.java:1017) at com.report.utils.GoogleAnlytics.getAvailableAccounts(GoogleAnlytics.java:41) at com.report.utils.GoogleAnlytics.run(GoogleAnlytics.java:113) at com.report.utils.GoogleAnlytics.main(GoogleAnlytics.java:164)
我做了什么
我正在使用帐户url
"https:https://www.google.com/analytics/feeds/accounts/default"
我在互联网上搜索了这个问题,但找不到任何解决方案。 有什么问题,我该怎么解决?
该Feed已被Google关闭。 请参阅帐户Feed关闭
Data Export API v2.3迁移已完成,API已关闭。 如果您的应用程序尝试访问帐户Feed,它现在将收到404错误响应。 要解决此错误,请迁移到Management API以访问配置数据。
按照https://developers.google.com/analytics/devguides/config/mgmt/v2/mgmtJava
更改帐户个人资料url访问https://www.googleapis.com/analytics/v2.4/management/accounts/~all/webproperties/~all/profiles
,并使用ManagementFeed / ManagementEntry而不是AccountFeed和AccountEntry我已经解决了我的问题:))