I would like to use the Microsoft Translator API in Android studio. So I tried to import this API into the project I created, but it didn't work. Please let me know.
·Environment Android Studio 1.5
First of all, as a method I tried myself,
I thought it was loaded as a library function and I thought it could be implemented, but when I try import, I get an error like an image. Figure 1
Figure 1
From this error, I found an image-like error in the Java file of the library...Figure 2
The rebuild did not erase the error. Could you tell me if there was a problem with the library import method and how I can fix this problem?
android android-studio
The reason is that a library called json-simple that the library depends on has not been imported.
There is a jar file that contains a library that depends on GitHub, so it will be solved by using it.
https://github.com/boatmeme/microsoft-translator-java-api
Instead of incorporating jar files, I think you can add them to app/build.gradle dependencies.
dependencies {
compile'com.memetix:microsoft-translator-java-api:0.6.2'
}
There are at least two problems.
If you want to skip the trouble and use it anyway, I think you can eliminate the error by removing the jar file that you are currently trying to import and then executing one of the following A and B proposals.
Proposed A: Leave library dependency resolution to gradle and do not download jar files yourself.
Proposed B: Instead of creating a jar file by yourself, use a jar file with a dependency library provided in advance. - microsoft-translator-java-api-0.6.2-jar-with-dependencies.jar
I can't say for the problem in Figure 1 because I don't know the details of where I downloaded the file and how I made it into a jar file in the procedure of Downloading Microsoft Translator API. However, as far as the capture is concerned, there is a microsoft-transfer-java-api> directory.
Perhaps the manifest file does not contain the
Class-Path
attribute.
(If you would like to resolve this issue, please add details of the steps you have taken to the questionnaire.)
For the issue in Figure 2, you will need to download a separate dependency library and import it into the project.
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
582 PHP ssh2_scp_send fails to send files as intended
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.