I want to use Grid Layout, but get the following error:
Error: No resource identifier found for attribute 'columnCount' in package 'android'
Is this because my API level is 9?
Does Grid Layout REALLY need API level 14? (I use Version: 8.0.1.v201012062107-82219)
- If yes, what should I do? Please explain this step by step.
- If no, so what's the reason? I'm doing exactly the same as the example!
GridLayout needs API 14
You can create a Layout for the other android versions -> Adapt layout to Android platform or API level
In your manifest use:
However, this will mean that any device running an
Android API
below 14 will not be able to use your appYes, the GridLayout is only available if you run it on devices with API Level 14 or higher.
Not sure what that version 8.0.1.... is ? Definitely not the Android version.
If you plan to run your application on anything earlier than Ice Cream Sandwich I am afraid you have to use something else than that Layout. TableLayout maybe ? Or check this question
MORE (from comments):
Either you are ok with your app to run only on ICS or above (so somebody with a phone with Gingerbread will not be able to run it for example).
If yes, then:
And this error should go away.
If no, then you CANNOT use GridLayout. You have a few options to replace it:
Here are the steps i spent to solve my problem:
To use GridLayout, i figured out many things should be upgraded.
Now everything is ok..
Thanks to everybody helped me in this post (viperbone, Doomsknight, Matthieu, MemLeak,Jeroen).