0

i am new to android and i want an application that checks the matching of sentence against a sentence. for that i m using stanford tregex tool and i have included the 4 jar files form the package into the libs of my project. while running i got an error in console that tells Unable to execute dex: Multiple dex files define Ledu/stanford/nlp/graph/Connected Components...i don't know why...what i need to do for this...please explain

TregexPattern objTregexPattern=TregexPattern.compile("hi a am yureka");
Tree objTree2=newLeaf("my name is yureka which is a new word"); 
    TregexMatcher objTregexMatcher=objTregexPattern.matcher(objTree2);
    if(objTregexMatcher.find()){
        Toast.makeText(this,"Match found", Toast.LENGTH_LONG).show();
    }
    else{
        Toast.makeText(this,"Match not found", Toast.LENGTH_LONG).show();
    }
CATIEEE
  • 45
  • 1
  • 9

2 Answers2

0

That error usually means that you have more than 1 jar file in your project with a class ConnectedComponents in the package edu.stanford.npl.graph.

Make sure you are adding the JAR file only once, and check also if you have 2 different JARs which may have the very same class.

By removing the duplicities, your application should work.

zozelfelfo
  • 3,776
  • 2
  • 21
  • 35
  • yes..got it but i got some error in the above code...could you tell which tool is used to find the matching percentage of particular sentence against a sentence.....please hep me...is that tool is in stanford software,.... – CATIEEE Sep 02 '14 at 11:34
0

This type of error are occur mostly in two reason :

first as @zozelfelfo said : including multiple jar file, as you include same jar in lib and your main project so it doing duplicate,

   -> removing the duplicities jar files

Seconds you are forgot to include one of the necessary jar file in your lib,due to it, show error multiple dex file- class not founds.

  -> check for necessary jar file if any forgot
Nirav Mehta
  • 1,715
  • 4
  • 23
  • 42