当 GoogleAnalyticsTracker.getInstance() 时 NoClassDefFoundError [英] NoClassDefFoundError when GoogleAnalyticsTracker.getInstance()

查看:24
本文介绍了当 GoogleAnalyticsTracker.getInstance() 时 NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 com.google.android.apps.analytics.GoogleAnalyticsTracker但是在

I'm tring to use com.google.android.apps.analytics.GoogleAnalyticsTracker but got NoClassDefFoundError when

GoogleAnalyticsTracker.getInstance();

我确定构建路径中包含 libGoogleAnalytics.jar 并且代码构建成功.

I'm sure that libGoogleAnalytics.jar is included in the Build Path and the code was successfully built.

在我怀疑错误发生在我将 ADT 更新到最新但没有任何线索之前,该代码运行良好.

that code worked perfectly before that I suspect that the error occur after I updated the ADT to the latest but no clue.

有人可以就此提出任何建议吗?

Could anybody give any suggestions on this?

推荐答案

实际上这是我们在使用 ADT 17 时面临的问题,您必须将 jar 文件放入 libs 文件夹才能克服此异常

Actually this is the problem we are facing with ADT 17 you have to put your jar file into libs folder in order to overcome this exception

所以右键单击您的项目 --> 创建一个名为 libs

so right click on your project -->create a folder with name libs

并在

 right click (on libs folder) -->import-->File System-->browse to select your jar file and hit finish and run you project.

在那之后

 right click on the project --> Built Path-->java built path-->add jars select your jar file from your libs folder

这篇关于当 GoogleAnalyticsTracker.getInstance() 时 NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆