Shanmugasundharam
Shanmugasundharam

Reputation: 2092

Type Cast Android cannot Cast 'Android .view.View to GridView

I am working on GridView in android Studio. When I initialise the GridView, I am getting a type cast error:

Inconvertible types; cannot cast 'android.view.View' to 'com.example.pageviewer.GridView'

Can you any one please. Thanks in Advance

enter image description here

Upvotes: 1

Views: 1241

Answers (1)

Gueorgui Obregon
Gueorgui Obregon

Reputation: 5087

Rename your GridView class to GridViewActivity and the problem will be solved.

Upvotes: 3

Related Questions