Reputation: 1449
So my coworker uploaded a project to GitHub which i pulled. I expected everything to be okay, but for some reason it won't load v7 support library (it gives sqiggly red lines under the v7 import)
Does anyone know how to solve this?
EDIT:
build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
}
}
dependencies {
compile 'com.android.support:appcompat-v7:19.0.0'
}
Upvotes: 0
Views: 865
Reputation: 164
In eclipse, you have to import the support libraries into your workspace by clicking "file" "import" and then browsing to wherever the SDK lives on your computer ... adt-bundle-windows-x86_64-20131030>sdk>extras>android>support>v7 (for the root directory). Then some projects should appear in the "Projects to import" window. Select the ones you need and then select "finish". Once they are in your work space, select your project that needs them and right click it and select "properties". Then a window pops up. Select "Android" on the left and then in the bottom box select the v7 support libraries that you need and select "add", then "OK." Now you have to rebuild your project and the red squiggly lines should go away. Yay!
Upvotes: 1
Reputation: 80020
Make sure the Android Support Repository is installed in your SDK manager:
Upvotes: 1