Setting up Android support package v7 for eclipse - GridLayout

前端 未结 7 1100
再見小時候
再見小時候 2020-12-24 06:08

I\'ve been trying this all evening to no avail so I\'m going to list my exact steps starting from scratch.

  • I\'ve installed the support package via SDK manager.
7条回答
  •  误落风尘
    2020-12-24 06:36

    I use intellij idea, so it's not exactly your case, but maybe it will be helpfull. I struggled with setting this up whole day, then it suddenly worked. I'll describe my setup so you can compare:

    1. setup the GridLayout project as library project. Example of setting up can be found at android developer site here
    2. setup your main project as usual, reference the library project as described in the link above.
    3. add libraries to your main project. I used latest android-support-v13.jar and android-support-v7-gridlayout.jar. NOTE: I used the v7 support library in the main project, not the library project. In fact, checking it now - in library project I don't reference the v7 support.
    4. Use full package name in the layout file: instead of
    5. use custom namespace, something like this: xmlns:grid="http://schemas.android.com/apk/res-auto" in your layout file to use custom attributes defined in the library project in your tag, like grid:columnCount

    hope this helps. I'm currently trying it, not even sure it is something I need :)

提交回复
热议问题