简体   繁体   English

Android尝试使用java.awt,Color,但未包含

[英]Android trying to use java.awt,Color but its failing to include

I am trying to use some libraries from the jre but i cant seem to import them as external jars to my android project. 我正在尝试使用jre中的一些库,但是我似乎无法将它们作为外部jar导入到我的android项目中。 Is this even possible ? 这有可能吗? I am using an image recognition library and this class is importing java.awt.Color javax.imageio.imagereader etc.. 我正在使用图像识别库,此类正在导入java.awt.Color javax.imageio.imagereader等。

The JRE libraries contain native code so they cannot be distributed with your app. JRE库包含本机代码,因此无法与您的应用程序一起分发。 There are some attempts to port AWT to Android, but I don't think any are complete drop-in replacements. 有一些尝试将AWT移植到Android,但我认为没有任何替代品可以完全替代。 If you have source for the library you are using, you can try to adapt it to Android equivalents of the AWT components that it relies on. 如果您拥有正在使用的库的源代码,则可以尝试使其适应于其所依赖的AWT组件的Android等效版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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