no9
no9

Reputation: 6544

Android - Debugging referenced project problem

I have 3 projects in Eclipse Helios.

  1. A (java project)
  2. B (Android library project)
  3. C (Android application project)

The references are set like this: B references A and C references B.

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.

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.

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.

What am i doing wrong?

Upvotes: 1

Views: 1784

Answers (1)

JPM
JPM

Reputation: 9306

I have exactly the same structure A - Java project (commonlibs), B Android Lib Project(ndkfoo2) and C Android App.

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.

enter image description here

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.

Upvotes: 1

Related Questions