0
我在Android Studio 0.5.2中遇到了gradle問題。Gradle無法找到依賴項
它如下圖所示:
找不到com.android.support:support-v4:19.0.0。
需求:
org.codepond:wizardroid:1.2.0
請從Android SDK Manager安裝Android支持庫。
我還安裝了Android支持庫。
我的build.gradle看起來像這樣:
apply plugin: 'android-library'
apply plugin: 'android-maven'
apply plugin: 'signing'
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode project.ext.versionCode
versionName version
}
}
dependencies {
compile 'com.android.support:support-v4:19.0.0'
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
boolean hasCredentials = hasProperty('sonatypeUsername') && hasProperty('sonatypeUsername')
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
configuration = configurations.archives
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
if (hasCredentials) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
if (hasCredentials) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
}
pom.project {
name 'WizarDroid'
description 'Lightweight Android library for creating step by step wizards'
url 'http://wizardroid.codepond.org'
scm {
url 'http://www.github.com/nimrodda/wizardroid'
connection 'scm:git://github.com/Nimrodda/WizarDroid.git'
developerConnection 'scm:git://github.com/Nimrodda/WizarDroid.git'
}
licenses {
license {
name 'The MIT License (MIT)'
url 'https://raw.github.com/Nimrodda/WizarDroid/master/license'
distribution 'repo'
}
}
developers {
developer {
id 'nimrodda'
name 'Nimrod Dayan'
email '[email protected]'
}
}
organization {
name 'CodePond.org'
url 'http://www.codepond.org'
}
issueManagement {
system 'GitHub Issues'
url 'https://github.com/nimrodda/wizardroid/issues'
}
parent {
groupId 'org.sonatype.oss'
artifactId 'oss-parent'
version 7
}
}
}
}
}
你有支持庫(19.0.0)的正確版本? – JamesK
安裝的android支持庫修訂版本是19.1 – Khosravi