I want to create a GridLayout able to run in all the APIs.
The thing is, when i use GridLayout instead of android.support.v7.widget.GridLayo
I got the same issue. I solved it by using the GridLayout from package android.support.v7.widget.GridLayout, since I was previously using the android.widget.GridLayout package which gave me the error.
android.support.v7.widget.GridLayout
android.widget.GridLayout package