【发布时间】:2016-01-25 15:24:14
【问题描述】:
我正在尝试从 android 武器库添加 PinnedSectionListView。
添加方式说: 将特定的存储库添加到您的构建文件中:
repositories {
maven {
url "https://jitpack.io"
}
}
在你的构建文件中添加依赖(不要忘记指定正确的限定符,通常是'aar'):
dependencies {
compile 'com.github.beworker:pinned-section-listview:v1.0'
}
所以我这样做了(build.gradle(项目)):
buildscript {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle(模块):应用插件:'com.android.application'
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.jonathandg.listviewsections"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.beworker:pinned-section-listview:v1.0@aar'
//compile 'com.beworker:pinned-section-listview:v1.0'
}
那么android studio消息是
Error:(25, 13) Failed to resolve: com.beworker:pinned-section-listview:v1.0
【问题讨论】:
标签: android android-studio gradle dependencies