私はApache OpenNLPライブラリを使いたいChatBot androidアプリケーションを開発しています。私はOpenNLPをダウンロードして使用するために、このtutorialに従っています。 zipファイルをダウンロードした後、2つのjarファイルをAndroid Studioにライブラリとして追加するように指示されました。次に、モジュールディレクトリのbuild.gradleファイルにコンパイルオプションを追加しました。私は、アプリケーションを実行しようとしたとき、私は私が実行しようとすると、AndroidスタジオにApache OpenNLPをインストールして統合する
> Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
は、その後、私はこれをやった後、私のGradleファイル
compileOptions{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
に次の行を追加して、次のようGradleのビルド・エラーが発生しましたコード。私、これはその後、私は私は私のアプリを実行しようとすると、私はエラーの最大数を取得します。この後
jackOptions{
enabled true
}
defaultConfigブロック内の私のGradleファイルに以下を追加しGradleの同期に
Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.
Error:Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.
を失敗します
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.io.FileFilter
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.io.FileFilter
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.io.FileFilter
Error:Default method void updateAdaptiveData(java.lang.String[] tokens, java.lang.String[] outcomes) not supported in Android API level less than 24
Error:Default method void clearAdaptiveData() not supported in Android API level less than 24
Error:Default method void reset() not supported in Android API level less than 24
Error:Default method void close() not supported in Android API level less than 24
Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.core.JackToolchain$ToolchainException: Jack compilation exception
誰でも教えてください。アプリケーションでOpenNLPメソッドを使用できるようにしたいと考えています。私は掃除と再建を試みましたが無駄でした。