0

Currently my dependencies look like:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/volley_1_0_8.jar')
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:support-v7:21.0.2'
compile files('libs/volley.jar')
compile files('libs/picasso-2.4.0.jar')
}

Which gives me the following error:

  Error:Failed to find: com.android.support:support-v4:21.0.2
  Install Repository and sync project
  Open File
  Open in Project Structure dialog

It looks like I have everything needed inside the SDK:

enter image description here

Clicking on "Install Repository and sync project" prompts me to install the support repo rev 9 (which I already have, according to the SDK manager?) While installing I always get the error

 Failed to rename directory C:\Program Files (x86)\Android\android-studio\sdk\extras\android\m2repository to C:\Program Files (x86)\Android\android-studio\sdk\temp\ExtraPackage.old01.

It seems the directory is in use by Android Studio itself.

The question: how can I install the v7 support?

Droidman
  • 11,485
  • 17
  • 93
  • 141

1 Answers1

1

The current version of the support-v4 is 21.0.0. There is no such library as support-v7 - if you mean appcompat-v7, then that is also 21.0.0 as per gradleplease.appspot.com, which is a handy reference for the latest versions of various libraries.

The reason the SDK Manager has the version at 21.0.2 is because other parts of the support library (specifically, the Multidex support library) was changed since the initial release of version 21.0.0, but that did not change the support-v4 or other parts.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
  • oh well.. thanks. I'm a bit confused after changing to AS. Could you point me out how to use the `ActionBarDrawerToggle` so it't not deprecated? Could not get it from the answers around here on SO – Droidman Nov 20 '14 at 21:02
  • You'd want to use the `v7` version of `ActionBarDrawerToggle` per [this answer](http://stackoverflow.com/a/26434879/1676363) – ianhanniballake Nov 20 '14 at 21:15