【问题标题】:How can I import java.awt.image.BufferedImage in Android Studio如何在 Android Studio 中导入 java.awt.image.BufferedImage
【发布时间】:2015-10-19 08:41:30
【问题描述】:

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

有什么想法吗?

谢谢!

【问题讨论】:

  • 我建议使用 Android 自己的 Bitmap 类而不是 awt 图像。
  • 您好,谢谢您的回答。我已经有了实现,如果有办法导入 JRE,我宁愿不更改我的代码
  • 我强烈建议你改变你的实现
  • 但是为什么呢?导入 jre 库系统会引发其他问题吗?

标签: java android android-studio bufferedimage


【解决方案1】:

你不能。

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

查看以下类似问题:

Porting AWT graphics code to Android

How to add java AWT image package in Android

Using AWT with Android

【讨论】:

猜你喜欢
  • 2015-04-17
  • 2018-10-06
  • 2023-03-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-10
  • 2013-12-09
  • 2023-04-02
相关资源
最近更新 更多