4

I am trying to add the backwards compatible Gridlayout library to my android project but I can't get it working. And, I have read all other articles on google and on stackoverflow but it still does not work.

Here is what I did, step by step:

  1. Imported the Gridlayout project as an existing project into my workspace. I used the Gridlayout project that i found in my sdk, namely this path: adt-bundle-mac-x86_64/sdk/extras/android/support/v7/gridlayout

  2. In my actual project I then went to Properties, Android and added android-support-v7-gridlayout as a library to my project.

  3. I then went to my xml layout file in my project and added a GridLayout to it.

Here is the code:

<android.support.v7.widget.GridLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

My problem: When I switch to the Graphical Layout of my xml layout, I see this error message:

The following classes could not be found:
- android.support.v7.widget.GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML, Create Class)

What can I do about that? Any tips? This really drives me crazy...

Here is some additional info on my project:

  • In my Android Dependencies folder I do have android-support-v7-gridlayout.jar
  • In my gen folder I have a package called android.support.v7.gridlayout
  • The project android-support-v7-gridlayout in my workspace does not have any errors

EDIT: Here is a screenshot of my project:

Screenshot of my project

user2426316
  • 7,131
  • 20
  • 52
  • 83
  • 1
    Have you tried to restart eclipse and then do a clean? – JRomero Aug 06 '13 at 17:14
  • sure. did that a lot of times with, rebooted and everything. no chance ... – user2426316 Aug 06 '13 at 17:20
  • Can you attach a screenshot with `gen`, `Android Private Libraries`, `Android Dependancies` expanded? – JRomero Aug 06 '13 at 17:25
  • If you are using the R22 or higher ADT on Eclipse, make sure that the "Order & Export" portion of both projects' build paths are set up correctly: http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22/16596990#16596990 – CommonsWare Aug 06 '13 at 17:26
  • @J.Romero I added a screenshot. Any suggestions? – user2426316 Aug 06 '13 at 18:02
  • In my build (R22.0.5) the library is both added to my `Android Dependancies` and `Android Private Libraries`. Can you check what version you are on and possible update? @user2426316 – JRomero Aug 06 '13 at 18:12

0 Answers0