Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: The type java.awt.Image cannot be resolved. It is indirectly referenced from required .class files

Tags:

java

android

awt

I am using some java projects in my Android project. I gave reference to those projects by adding them in Java Build Path and Project References. After doing this i can access classes of java projects in my android project. but getting this error

 The type java.awt.Image cannot be resolved. It is indirectly referenced from required .class files

what should i do now?? Do i need to add any JRE or something else would help??

like image 937
Shiv Avatar asked Apr 22 '13 06:04

Shiv


2 Answers

Found solution:

go to project properties java build pata->Add library

and add JRE System Library and click finish. Now you can use java.awt package :)

like image 165
Shiv Avatar answered Sep 19 '22 01:09

Shiv


You can't use projects that are dependent on java.awt.Image or other awt packages (except java.awt.font) in Android as the dalvik runtime doesn't have these classes in it.

like image 43
Pradeep Pati Avatar answered Sep 18 '22 01:09

Pradeep Pati