1

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?

Pouton Gerald
  • 1,625
  • 22
  • 32

1 Answers1

0

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.

Community
  • 1
  • 1
Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124
  • I do as you said, the red underline didn't go away. So I clean and it went away. But then as soon as I make an edit the red returns. So basically your suggestion made completely no difference. But I will read the link. – Pouton Gerald Jun 13 '13 at 20:25
  • doing `` seems to work. Thanks. – Pouton Gerald Jun 13 '13 at 20:27
  • Actually, I just realize the change cause all my formatting to go away. It basically treat my work as a LinearLayout with horizontal orientation. – Pouton Gerald Jun 13 '13 at 20:52