William Kinaan
William Kinaan

Reputation: 28829

how to include gridlayout to android platform 2.2 API level 8

i tried to installed Android Compatibility to platform 2.2 by clicking right click on my project , android tools , add support library then i got these messages

[2012-12-08 06:13:12 - SDK Manager] Fetching https://dl-ssl.google.com/android/repository/addons_list-1.xml
[2012-12-08 06:13:18 - SDK Manager] Validate XML
[2012-12-08 06:13:18 - SDK Manager] Parse XML
[2012-12-08 06:13:18 - SDK Manager] Fetched Add-ons List successfully
[2012-12-08 06:13:18 - SDK Manager] Fetching URL: https://dl-ssl.google.com/android/repository/repository-6.xml
[2012-12-08 06:13:21 - SDK Manager] Validate XML: https://dl-ssl.google.com/android/repository/repository-6.xml
[2012-12-08 06:13:21 - SDK Manager] Parse XML:    https://dl-ssl.google.com/android/repository/repository-6.xml
[2012-12-08 06:13:21 - SDK Manager]     Found Android SDK Platform-tools, revision 12
[2012-12-08 06:13:21 - SDK Manager]     Found Android SDK Tools, revision 20
[2012-12-08 06:13:21 - SDK Manager] Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
[2012-12-08 06:13:26 - SDK Manager] Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
[2012-12-08 06:13:26 - SDK Manager] Fetching URL: http://software.intel.com/sites/landingpage/android/addon.xml
[2012-12-08 06:13:28 - SDK Manager] Validate XML: http://software.intel.com/sites/landingpage/android/addon.xml
[2012-12-08 06:13:28 - SDK Manager] Done loading packages.

then i tried to make new Gridlayout on my XML layout but eclipse eclipse doesn't recognize this layout.

  1. has the gridlayout installed?
  2. if yes how could i use it
  3. if i could use it, when i will install the apk on my phone(2.2) have i installed the library on my phone too? of it is moved with apk?

Edit

this is what i got when i open the SDK manager , i am from Syria so is that because Google forbidden its products to syrian? enter image description here

Upvotes: 0

Views: 4534

Answers (2)

Ali Imran
Ali Imran

Reputation: 9247

enter image description hereGridLayout has been backported to be compatible with API level 7 and up. It's (sort of) part of the support library. After you've downloaded the support library, you'll find an Android library project in your local sdk folder located at:

<sdk_folder>\extras\android\compatibility\v7\gridlayout

Set it up as dependency of the project you're working on. After that, you'll need to make sure you point any references throughout your project to this one, and not the level 15 version, in order to support pre-ICS devices. Usage should be similar, if not identical.

Upvotes: 1

dmason82
dmason82

Reputation: 399

From what it looks like to me is that you didn't get prompted to install the compatibility library. I just did a test run within Eclipse and installed the compatibility library and I got an interactive dialog stating that it found the Android Support Library and had me go through an installation process. This is the output on the console as I downloaded the support library.

[2012-12-08 06:25:13 - SDK Manager] Done loading packages.
[2012-12-08 06:25:18 - SDK Manager] Preparing to install archives
[2012-12-08 06:25:18 - SDK Manager] Downloading Android Support Library, revision 11
[2012-12-08 06:25:22 - SDK Manager] Installing Android Support Library, revision 11
[2012-12-08 06:25:26 - SDK Manager]   Installed Android Support Library, revision 11
[2012-12-08 06:25:26 - SDK Manager] Done. 1 package installed

Perhaps one thing you can try is using the SDK Manager install the Android Support Library under the Extras folder, then after you install it, you would go to Project -> Properties -> Java Build Path. Click on Libraries, and click "Add External JARs". From there you will be asked a JAR file to include and the Support library will be under your SDK install Path/Extras/Android/Support/v##, where the hash tags indicate the version of the Android Support library you have installed. in there there will be an android-support-v##.jar file and that is what you would import into the project.

Hopefully that is helpful.

Upvotes: 1

Related Questions