IntelliJ: Getting GridLayout work IntelliJ: Getting GridLayout work android android

IntelliJ: Getting GridLayout work


Today I struggled with this and on android dev site I found simpler solution and why they're problems with it. GridLayout from v7 libraries aren't connected with v7 appcompat library so you must add v7 gridlayout library dependency manually.

If you use gradle then in build.gradle just add

dependencies {    ...    compile 'com.android.support:gridlayout-v7:23.2.0'}

and everything should works fine :)


You need to use the full package and class name:

<android.support.v7.widget.GridLayout>

And add the namespace so that other controls will use the default package:

xmlns:grid="http://schemas.android.com/apk/res-auto"