views:

18

answers:

1

When I type ImageView or AnimationDrawable I get a string of errors proclaiming:

AnimationDrawable cannot be resolved to a type.

line 14 Java Problem

I don't understand, do I need to create another class? Or do the AnimationDrawables just not go in the filename.java?

And if I do need to create another class, can you show me how?

A: 

Are you importing those clases?

// this must be placed at beginning of your file
// after the 'package' statemen
import android.widget.ImageView;
import android.graphics.drawable.AnimationDrawable;

If you are using Eclipse, you don't need to manually import those classes: you can press Ctrl+Shift+i and it will automatically add the imports statements that you need (it will also remove the ones that you are not using).

Cristian
I cannot BELIEVE I missed that. Thanks. ImageView works as an import, but AnimationDrawable STILL refuses to be imported. Why would that be?
Mia
Thank you sooooooo much! *hugs*You guys are great!
Mia