In Eclipse, how can I quickly access the source of the “Android library project” from the source of the project that uses it?

  • Project A is an android library project in my workspace (via project properties → android-> library: is library).
  • Project A announces classA.
  • Project B uses project A (via project properties -> android-> library: add ...).
  • Project B creates an instance of class A.

When I use F3 ("open declaration") on an instance of classA in project B, it leads me to class Class.class in A.jar, which is included in B, built from A.

Is there a way to go directly to the source A.java class in project A, and not look for it in the package explorer?

I think this is new for ADT14, there used to be an X_src folder for every included library project: for example. A_src will appear in B as the source folder in the project root.

+6
source share
1 answer

Right-click the non-library project (Project B) and select Build Path:

  • On the Projects tab, add the A Project library project as a dependency.
  • On the Order and Export tab, verify that Project A has a higher priority than placeholder library / package projects.

I had to do both of these steps to fix this problem with ADT15, Eclipse 3.7 and new projects.

+7
source

Source: https://habr.com/ru/post/900092/


All Articles