Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行报NoClassDefFoundError #79

Open
caoyi01 opened this issue Jun 21, 2013 · 10 comments
Open

运行报NoClassDefFoundError #79

caoyi01 opened this issue Jun 21, 2013 · 10 comments

Comments

@caoyi01
Copy link

caoyi01 commented Jun 21, 2013

06-21 10:17:11.098: E/AndroidRuntime(367): FATAL EXCEPTION: main
06-21 10:17:11.098: E/AndroidRuntime(367): java.lang.NoClassDefFoundError: com.umeng.analytics.MobclickAgent
06-21 10:17:11.098: E/AndroidRuntime(367): at cn.eoe.app.ui.base.BaseActivity.onCreate(BaseActivity.java:36)
06-21 10:17:11.098: E/AndroidRuntime(367): at cn.eoe.app.ui.SplashActivity.onCreate(SplashActivity.java:21)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.os.Handler.dispatchMessage(Handler.java:99)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.os.Looper.loop(Looper.java:123)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-21 10:17:11.098: E/AndroidRuntime(367): at java.lang.reflect.Method.invokeNative(Native Method)
06-21 10:17:11.098: E/AndroidRuntime(367): at java.lang.reflect.Method.invoke(Method.java:521)
06-21 10:17:11.098: E/AndroidRuntime(367): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-21 10:17:11.098: E/AndroidRuntime(367): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-21 10:17:11.098: E/AndroidRuntime(367): at dalvik.system.NativeStart.main(Native Method)

手动导入umeng包,再运行还是报这个错误,怎么解决??
现在只要调用umeng包就报这个错误,我该怎么解决?

@KennethYo
Copy link

build path不能解决的话,试着把我截图里的东西都勾选上。

youzicong

发件人: caoyi01
发送时间: 2013-06-21 10:11
收件人: eoecn/android-app
主题: [android-app] 运行报NoClassDefFoundError (#79)
06-21 10:17:11.098: E/AndroidRuntime(367): FATAL EXCEPTION: main
06-21 10:17:11.098: E/AndroidRuntime(367): java.lang.NoClassDefFoundError: com.umeng.analytics.MobclickAgent
06-21 10:17:11.098: E/AndroidRuntime(367): at cn.eoe.app.ui.base.BaseActivity.onCreate(BaseActivity.java:36)
06-21 10:17:11.098: E/AndroidRuntime(367): at cn.eoe.app.ui.SplashActivity.onCreate(SplashActivity.java:21)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.os.Handler.dispatchMessage(Handler.java:99)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.os.Looper.loop(Looper.java:123)
06-21 10:17:11.098: E/AndroidRuntime(367): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-21 10:17:11.098: E/AndroidRuntime(367): at java.lang.reflect.Method.invokeNative(Native Method)
06-21 10:17:11.098: E/AndroidRuntime(367): at java.lang.reflect.Method.invoke(Method.java:521)
06-21 10:17:11.098: E/AndroidRuntime(367): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-21 10:17:11.098: E/AndroidRuntime(367): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-21 10:17:11.098: E/AndroidRuntime(367): at dalvik.system.NativeStart.main(Native Method)
手动导入umeng包,再运行还是报这个错误,怎么解决??

Reply to this email directly or view it on GitHub.

@caoyi01
Copy link
Author

caoyi01 commented Jun 21, 2013

没有截图啊!!!

@KennethYo
Copy link

properties ——》java build path——》Order and Export

youzicong

发件人: 涩狼
发送时间: 2013-06-21 12:41
收件人: eoecn/android-app
抄送: KennethYo
主题: Re: [android-app] 运行报NoClassDefFoundError (#79)
没有截图啊!!!

Reply to this email directly or view it on GitHub.

@caoyi01
Copy link
Author

caoyi01 commented Jun 21, 2013

可以了,谢谢!什么原因啊?

------------------ 原始邮件 ------------------
发件人: "KennethYo"[email protected];
发送时间: 2013年6月21日(星期五) 中午1:01
收件人: "eoecn/android-app"[email protected];
抄送: "曹义"[email protected];
主题: Re: [android-app] 运行报NoClassDefFoundError (#79)

properties ——》java build path——》Order and Export

youzicong

发件人: 涩狼
发送时间: 2013-06-21 12:41
收件人: eoecn/android-app
抄送: KennethYo
主题: Re: [android-app] 运行报NoClassDefFoundError (#79)
没有截图啊!!!

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

@vinceyuan
Copy link

我也遇到了这个问题。
解决方法:

  1. 在项目上点右键,Properties -> Java Build Path -> Libraries -> Add JARs... 选中libs目录中的umeng_sdk.jar
  2. 然后在同一页面的Order and Export中,勾选umeng_sdk.jar,点击OK。
    这样umeng_sdk.jar才被加入了程序包中安装到机器或虚拟机上。

eoe能不能有点专业精神啊,既然都开源了,应该写个步骤教教像我这样的新手设置一下环境,好歹能运行起来啊。我这个新手摸索了半天,才找到方法。不敢独享,赶快发上来,防止别人又浪费时间。

虽然这个umeng_sdk的问题解决了,但还是有另外一个严重的问题导致代码无法运行 #78

我觉得挺奇怪的,这个项目比较活跃,一直有人提交代码,难道他们都没有这些问题吗?

@feicien
Copy link
Contributor

feicien commented Jul 5, 2013

sdk升级到22后,很多以前的项目都会出现这样的问题。

@blessworld
Copy link

@vinceyuan 果然能跑了,非常感谢啊~!

@mjkohoh
Copy link
Contributor

mjkohoh commented Oct 2, 2013

这和 #78 是相同的问题吧

@mjkohoh
Copy link
Contributor

mjkohoh commented Oct 11, 2013

不顺便关了这个issue @IceskYsl 。原谅我的强迫症

@mjkohoh
Copy link
Contributor

mjkohoh commented Oct 15, 2013

要不顺便关了这个issue @IceskYsl 。原谅我的强迫症

benbearchen pushed a commit to benbearchen/android-app that referenced this issue Dec 1, 2013
…akethe denpendencies will be exported when building
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants