Droidman
Droidman

Reputation: 11608

how do I properly install support-v7 repo in Android Studio

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?

Upvotes: 0

Views: 8498

Answers (1)

ianhanniballake
ianhanniballake

Reputation: 200010

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.

Upvotes: 1

Related Questions