Android Studio Gradle cannot find "com.android.support:design:22.2.0" (Android design support library)

This problem has been incredibly frustrating for me in the past two weeks.

Using the Android SDK Manager, I updated the following:

Tools: Android SDK Tools rev. 24.3.3 Android SDK Platform-tools rev. 22 Android SDK Build-tools rev. 22.0.1 Android 5.1.1 (API 22): SDK Platform rev. 2 Google APIs rev. 1 Sources for Android SDK rev. 1 Extras: Android Support Repository rev. 16 Android Support Library rev. 22.2.1 Google Repository rev.22 

This is an accurate list of all the repositories that I installed and updated using the Android SDK Manager.

However, when I try to add a line:

 compile 'com.android.support:design:22.2.0' 

Gradle is stuck in addDependecies. Also, when I go to the module settings, and then to the dependencies, when I try to add a new library, "com.android.support:design:22.2.0" does not appear in the list!

Here's more information about my target, compilation, and minimum SDKs:

 android { compileSdkVersion 22 buildToolsVersion '22.0.1' defaultConfig { applicationId "com.myandroidapplication.newtestapp" minSdkVersion 14 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { } } 

What can I gulf now? Thanks!

+4
source share
2 answers

You need to use version 22.2.1 installed on your computer.

 compile 'com.android.support:design:22.2.1' 
+12
source

For me, I first added a support library dependency by injecting it directly into the build.gradle of my application. I cleared the line I typed and added the dependency via the android studio GUI,

  • Go to File
  • Choose project structure
  • Click the Dependencies Tab
  • Click the + symbol in the upper right connector and select "Library Dependency".
  • Search and add support library in the dialog box that appears
  • Gradle build / sync should start automatically.

I don’t know why, but it works for me at least.

+2
source

All Articles