如何在 Android Studio 中导入 java.awt.image.BufferedImage

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33210065/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 21:21:34  来源:igfitidea点击:

How can I import java.awt.image.BufferedImage in Android Studio

javaandroidandroid-studiobufferedimage

提问by Lara Larsen

I need my android app to recognize BufferedImage and I am using Android Studio. I've seen that there is a way to import JRE library system in Eclipse but I am having trouble doing so in Android Studio.

我需要我的 android 应用程序来识别 BufferedImage 并且我正在使用 Android Studio。我已经看到有一种方法可以在 Eclipse 中导入 JRE 库系统,但是我在 Android Studio 中遇到了问题。

Any ideas?

有任何想法吗?

Thanks!

谢谢!

回答by ESala

You can't.

你不能。

The AWT package is not supported in Android, you need to change your implementation to use the Android classes.

Android 不支持 AWT 包,您需要更改您的实现以使用 Android 类。

See these similar questions:

看到这些类似的问题:

Porting AWT graphics code to Android

将 AWT 图形代码移植到 Android

How to add java AWT image package in Android

如何在Android中添加java AWT镜像包

Using AWT with Android

在 Android 上使用 AWT