title: (java.lang.VerifyError: Rejecting class) error when adding StanfordCoreNLP library in an Android Studio project
body: <p>I am developing an Android application (I am a beginner). I want to use Stanford CoreNLP 3.8.0 library in my app to extract the part of speech, the lemma, the parser and so on from the user sentences. </p>
  
  <p>I have tried a simple java code in NetBeans by following this youtube tutorial <a href="https://www.youtube.com/watch?v=9IZsBmHpK3Y" rel="nofollow noreferrer">https://www.youtube.com/watch?v=9IZsBmHpK3Y</a>, and it is working perfectly.</p>
  
  <p>The jar files that I imported to the NetBeans project are: stanford-corenlp-3.8.0.jar and stanford-corenlp-3.8.0-models.jar.</p>
  
  <p>And this is the java source code: </p>
  
  <pre><code>import edu.stanford.nlp.ling.CoreAnnotations;
  import edu.stanford.nlp.ling.CoreLabel;
  import edu.stanford.nlp.pipeline.Annotation;
  import edu.stanford.nlp.pipeline.StanfordCoreNLP;
  import edu.stanford.nlp.util.CoreMap;
  
  import java.util.List;
  import java.util.Properties;
  
  public class CoreNlpExample {
  
      public static void main(String[] args) {
  
          // creates a StanfordCoreNLP object, with POS tagging, lemmatization, NER, parsing, and coreference resolution
          Properties props = new Properties();
          props.setProperty("annotators", "tokenize, ssplit, pos, lemma, ner, parse, dcoref");
          StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
  
          // read some text in the text variable
          String text = "What is the Weather in Bangalore right now?";
  
          // create an empty Annotation just with the given text
          Annotation document = new Annotation(text);
  
          // run all Annotators on this text
          pipeline.annotate(document);
  
          List&lt;CoreMap&gt; sentences = document.get(CoreAnnotations.SentencesAnnotation.class);
  
          for (CoreMap sentence : sentences) {
              // traversing the words in the current sentence
              // a CoreLabel is a CoreMap with additional token-specific methods
              for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {
                  // this is the text of the token
                  String word = token.get(CoreAnnotations.TextAnnotation.class);
                  // this is the POS tag of the token
                  String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);
                  // this is the NER label of the token
                  String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);
  
                  System.out.println(String.format("Print: word: [%s] pos: [%s] ne: [%s]", word, pos, ne));
              }
          }
      }
  } 
  </code></pre>
  
  <p>I wanted to try the same code in Android Studio but I am facing a problem with adding these external libraries in my Android Studio 3.0.1 project. </p>
  
  <p>I have read on some websites that I need to reduce the size of the jar files, and I did that and made sure that the reduced jars are still working fine in the Netbeans project. But I am still facing problems in Android studio and this is the error that I am getting: </p>
  
  <pre><code>java.lang.VerifyError: Rejecting class edu.stanford.nlp.pipeline.StanfordCoreNLP that attempts to sub-type erroneous class edu.stanford.nlp.pipeline.AnnotationPipeline (declaration of 'edu.stanford.nlp.pipeline.StanfordCoreNLP' appears in /data/app/com.example.fatimah.nlpapplication-bhlUJOCUwLhSbkWE7NBERA==/split_lib_dependencies_apk.apk)
  </code></pre>
  
  <p>Any suggestions on how I can fix this and import Stanford library successfully?</p>