[英]error occurred "java: cannot access java.util.function.Function class file for java.util.function.Function not found " in selenium
[英]Resolve Class file for java.util.function.Function not found
我想在我的android項目中使用Stanford POS-tagger。
我將pos-tagger .jar文件添加到了Android Studio中的android項目中:
我可以正確導入庫:
import edu.stanford.nlp.tagger.maxent.MaxentTagger;
但是當我使用函數tagString時發生錯誤:
MaxentTagger tagger = new MaxentTagger("model/english-left3words-distsim.tagger");
String tagged = tagger.tagString("Hello World");//--->>ERROR
Log.i("tags",tagged);
編譯時出現錯誤:
錯誤:(34、31)錯誤:無法訪問java.util.function.Function的函數類文件找不到錯誤:任務執行失敗
':app:compileDebugJavaWithJavac'。 編譯失敗; 有關詳細信息,請參見編譯器錯誤輸出。
如何在我的Android項目中正確使用stanford pos-tagger?
您正在使用Java 8進行編譯嗎? CoreNLP的最新版本需要Java 8。 您看到的錯誤很可能是由於編譯器未找到新引入的Function
類。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.