Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
76 views
in Technique[技术] by (71.8m points)

android - NoClassDefFoundError when GoogleAnalyticsTracker.getInstance()

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

GoogleAnalyticsTracker.getInstance();

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

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?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

and follow this step in

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

after that

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...