简体   繁体   中英

Error while using javaxt

I am having a problem when using javaxt in my android application.

Basically what I did is, added the javaxt jar file as a library to my project and configured the build.gradle and the settings.gradle so the the javaxt jar file will be compiled. In my java class I am importing the javaxt.io.Image and my actual code is the following:

Image image = new Image("/storage/extSdCard/gps/gps_001.jpg");
double[] gps = image.getGPSCoordinate();

When I am trying to build my project the build is failing and the error is the following:

Error:(200, 27) error: cannot access RenderedImage class file for java.awt.image.RenderedImage not found Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Error:Execution failed for task ':app:compileDebugJava'.
> Compilation failed; see the compiler error output for details.

Anyone experiencing the same problem or have experienced the problem and solved it?

Thanks for your help.

Either your source code or your library uses java.awt.image.RenderedImage , which does not exist on Android. javaxt.io.Image definitely refers to RenderedImage .

Note that there is no sign that the authors of this library offer Android compatibility. You may find it easier to solve your problem using a library known to work on Android.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM