У меня проблема, что Gradle не может найти мою зависимость (Android support library).Gradle не может найти зависимость (поддержка Android-библиотеки)
Мой build.gradle выглядит следующим образом:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/FlurryAgent.jar')
compile group: 'com.google.android', name: 'support-v4', version: 'r7'
compile files('libs/YouTubeAndroidPlayerApi.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17"
defaultConfig {
minSdkVersion 11
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
Когда я строю (на командной строке, нет IDE) я получаю следующее сообщение:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'AndroidCalculator'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':compile'.
> Could not find com.google.android:support-v4:r7.
Required by:
:AndroidCalculator:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Почему я не позволил добавить Android Поддержка библиотеки, как это?
как насчет обхода этой проблемы путем набора зависимостей на основе пути к файлу, как это? скомпилировать файлы ("path_to_your_sdk/extras/android/support/v4/android-support-v4.jar", – kingori