java.lang.ClassNotFoundException android + eclipse + maven + osx [英] java.lang.ClassNotFoundException android + eclipse + maven + osx

查看:133
本文介绍了java.lang.ClassNotFoundException android + eclipse + maven + osx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将maven实现到现有的android项目中。
我已经通过上下文菜单> 配置> 转换为Maven项目。而且一切似乎都好,没有警告或错误。

但是当我尝试运行应用程序(就像之前一样),我得到:

  12-31 10:16:57.423:E / AndroidRuntime(14242):java.lang.RuntimeException:
无法实例化活动ComponentInfo {xxx / xxx.MainActivity}:
java.lang.ClassNotFoundException:xxx.MainActivity

我遵循了实施m2e和所有内容的所有说明看起来应该工作。
如果我不将项目转换为maven项目,应用程序运行正常。



任何建议,我失败了?



这是我的pom.xml的样子: http:// pastebin.com/ByXA0BP4

解决方案

我想到了自己。
将项目转换为maven项目后,右键单击src文件夹,并选择构建路径> 用作源文件夹



现在项目运行正常


I'm trying to implement maven into an existing android project. I've done so through the context menu > Configure > Convert to Maven project. And everything seems okay, no warnings or errors.
But when I try to run the app (just like before) I get:

12-31 10:16:57.423: E/AndroidRuntime(14242): java.lang.RuntimeException:
Unable to instantiate activity ComponentInfo{xxx/xxx.MainActivity}: 
java.lang.ClassNotFoundException: xxx.MainActivity

I've followd all the instructions on implementing m2e and everything looks like it should work.
If I don't convert the project to a maven project, the app runs fine.

Any suggestions where I'm failing?

This is what my pom.xml looks like: http://pastebin.com/ByXA0BP4

解决方案

I figured it out myself. After converting the project to a maven project, right click on the 'src' folder and chose Build path > Use as Source Folder

Now the project runs fine

这篇关于java.lang.ClassNotFoundException android + eclipse + maven + osx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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