Jump to content


Photo

Head First Android Development


  • Please log in to reply
2 replies to this topic

#1 Hitesh Dhanwani

Hitesh Dhanwani

    New Member

  • Members
  • Pip
  • 1 posts

Posted 11 May 2012 - 09:47 AM

Errors:

1st : The method onCreate(Bundle) is undefined for the type DefaultHandler


2nd: Cannot cast from TextView to ImageView

#2 Git15

Git15

    New Member

  • Members
  • Pip
  • 1 posts

Posted 26 June 2012 - 09:50 AM

I was trying the code for NASA(image of the day) RSS feed given in the book, but as i tried getting a reference to the image as follows;

ImageView imageView=(ImageView)findViewById(R.id.imageDisplay);
imageView.setImageBitmap(image);

I am getting following error;
"Cannot cast from TextView to ImageView".
What can be the cause for this error?

#3 Brasz

Brasz

    New Member

  • Members
  • Pip
  • 1 posts

Posted 09 July 2012 - 06:38 AM

I am getting following error;
"Cannot cast from TextView to ImageView".
What can be the cause for this error?

You probably declared imageDisplay as a TextView instead of an ImageView in your xml file.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users