pointing android xml layout to reference library

188 Views Asked by At

Needing to use GridLayout in my android 2.2 project, I import the reference library from /android-sdk-macosx/extras/android/support/v7/gridlayout. When I clean the project, the red underlines go away. But as soon as I try editing the xml layout file, the error returns:

View requires API level 14 (current min is 8): 
<GridLayout>

So how do I get the layout file to point to the API 7 grid layout?

1

There are 1 best solutions below

3
On

You might have read How to make Android GridLayout compatible to older version?. If not, I suggest you to go through. You said that you imported the reference library. But after importing it you also need to reference this library project to your working project. Right click your project -> Properties. SelectAndroidon the left andAdd`... Select the imported workspace library. It will show with green sign.

Hope this helps.