Android的 - 调试引用的项目问题 [英] Android - Debugging referenced project problem
问题描述
我有3个项目在Eclipse赫利俄斯。
I have 3 projects in Eclipse Helios.
- A(Java项目)
- B(Android的库项目)
- C(Android应用项目)
该引用设置是这样的:
b号A和C引用B点。
The references are set like this: B references A and C references B.
在我的项目C活性我创建了一个类,多数民众赞成的instace在我的项目A.
我在这条线上,并在项目一类的构造函数中设置一个断点。
In my activity in project C i created an instace of a class thats in my project A. I set a breakpoint on this line and in the class constructor in project A.
我打了调试和我得到异常调用的目标异常 - 类文件编辑:源未found.And应用程序崩溃,在项目的断点从来没有被击中
I hit debug and i get exception "Invocation target exception" - Class File Editor: Source not found.And the app crashes, breakpoint in project A never gets hit.
如果我直接referece项目A项目C都有断点被击中(仅当我打的第一个断点后继续执行)。但是,如果我踏入项目中,我得到了同样的错误。
If i referece project A directly in project C both breakpoints get hit (only if i hit proceed after the first breakpoint). But if i step into project A i get the same error.
我究竟做错了什么?
推荐答案
我有完全相同的结构A - Java项目(commonlibs),B的Android库项目(ndkfoo2)和C Android应用程序
I have exactly the same structure A - Java project (commonlibs), B Android Lib Project(ndkfoo2) and C Android App.
您必须确保在属性对于C只引用库项目在Android部分,而不是引用它在Java构建路径了。我犯了那个错误。还以没有提到应该在这里,要么在B处理的。
You have to make sure in the Properties for C you only reference the Library project in the Android section and not reference it in the Java build path too. I made that mistake. Also no reference to A should be here either that is handled in B.
然后,只需引用B A,你应该是好去。只有你将有被调试到你的项目的问题似乎存在这样prevents您从Android的源设置为分层项目的Eclipse中的错误。
Then just reference A in B and you should be good to go. Only issues you will have is debugging into your A project seems there is a bug in the eclipse that prevents you from setting your source to layered projects in Android.
这篇关于Android的 - 调试引用的项目问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!