Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AndroidPocketSphinx: build path contains duplicate entry: 'src' for project

I am trying to create a project (on eclipse ADT) from an existing project already unzipped into the workplace.

I am basically following the instructions in:

http://cmusphinx.sourceforge.net/2011/05/building-pocketsphinx-on-android/

But as soon as it imported the project, I received this unclear error message:

build path contains duplicate entry: 'src' for project 'AndroidPocketSphinx'

Well, I checked the directory tree: There is only one 'src' subdirectory in there.

I also found a similar post here but the suggested solution cannot be found in my environment. That is, a Target Name is already checked (Android is not under Resource, BTW, it's an optical illusion). So that can't be the problem.

Interestingly, the project does show up in Package Explorer:

With no errors, only 19 warnings.

The vast majority of the warnings are for unused imports, values and fields so I can ignore them, but I don't understand the following warning:

Description Resource    Path    Location    Type
Build path specifies execution environment J2SE-1.3. There are no JREs installed in the workspace that are strictly compatible with this environment.   AndroidPocketSphinx     Build path  JRE System Library Problem

So my questions are:

  1. Why am I receiving the error "build path contains duplicate entry: 'src' for project"?
  2. How do I fix that J2SE-1.3 execution environment warning?

Thanks

Update: This is the content of the project's .classpath file:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src">
        <attributes>
            <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="PocketSphinxDemo/libs/armeabi"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="src" path="jni"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.3"/>
    <classpathentry kind="lib" path="libs/LIUM_SpkDiarization-3.1.jar"/>
    <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>
like image 744
AndroSphinx Avatar asked Nov 01 '22 15:11

AndroSphinx


1 Answers

For the future, you should import project to workspace, not unzip them. The reason of your troubles is that you unzipped the project directly to your workspace and imported it after that. Don't do that.

Why am I receiving the error "build path contains duplicate entry: 'src' for project"?

Because there are duplicate entries. Build path is specified in project properties. You can remove duplicate entries in project properties in Java Classpath entry.

How do I fix that J2SE-1.3 execution environment warning?

You can update J2SE setting in project properties.

like image 147
Nikolay Shmyrev Avatar answered Nov 11 '22 12:11

Nikolay Shmyrev