Eclipse 中的“Open Declaration”导航到类文件,而不是 Android 库的源文件
我有两个Android项目“A”和“B”。“B”依赖于“A”,是一个库。每当我在项目“B”中点击“打开声明”以获取位于“A”中的Java源文件时,Eclipse都会导航到类文件而不是源文件。这当然有几个缺点!
我查看了项目“B”的构建路径,以查看引用的库“A”是否具有指向其源项目的正确路径,情况就是如此。
有人知道如何解决这个问题吗?
以下是每个项目的 .classpath 和 project.properties 文件:
项目 A .类路径
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
项目A 项目.属性
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-8
android.library=true
项目 B .类路径
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
项目 B 项目.属性
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-8
android.library.reference.1=../ProjectA