与链接到其他项目在Android的Eclipse环境问题 [英] Problem with linking to other project in Android Eclipse environment

查看:91
本文介绍了与链接到其他项目在Android的Eclipse环境问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序,使用类从另一个Eclipse Android项目我已经有了一个Eclipse项目。当我最初导入它(新建项目>的Andr​​oid项目>从现有的源),它有一堆错误,但是当我做了项目>性状> Java构建路径,并到项目选项卡,并添加了其他项目,这些错误就走开了。不幸的是,当我跑的应用程序,我在DDMS得到了以下错误:

  java.lang.NoClassDefFoundError的:[包名] .CONFIG
[堆栈跟踪]
 

有什么我应该添加到清单告诉它看其他的包?如果是的话,哪里会是被添加?

在此先感谢

解决方案

找到了答案。事实证明,如果我添加编译的类文件到一个JAR文件使用Eclipse的导出命令,然后在Java构建路径连接到外部的罐子,它的工作原理,而无需更改Android清单都没有。

I am developing an Android application as an Eclipse project that uses classes from another Eclipse Android project I already have. When I originally imported it (New Project > Android Project > From Existing Source), it had a bunch of errors, but when I did Project > Properties > Java Build Path and went to the projects tab and added the other project, the errors went away. Unfortunately, when I ran the application, I got the following error in DDMS:

java.lang.NoClassDefFoundError: [package name].Config
[stack trace]

Is there something I'm supposed to add to the manifest telling it to look at the other package? If so, where would that be added?

Thanks in advance

解决方案

Found the answer. It turns out that if I add the compiled class files into a JAR file using Eclipse's export command and then link to external jars in the Java Build Path, it works without having to change the Android Manifest at all.

这篇关于与链接到其他项目在Android的Eclipse环境问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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