今天从同事那检索项目导入后build发现了The project cannot be built until build path errors are resolved这个问题:
原因是因为团队代码环境不一致,项目中可能会引入框架核心源码的jar,由于不一致而造成的,解决办法就是删除后重新引入本地的:
方案一:
右键项目(You Project) -> Build path -> Configure Build Path -> Java Build Path -> Libraries 将带有 “X”的remove掉,然后重新导入 add build path。
方案二:
在你的项目根目录下面会有一个.classpath文件,打开后做如下修改,比如我的是
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
修改后:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
</classpath>