gpt4 book ai didi

android - 从 android arsenal 添加存储库的问题

转载 作者:行者123 更新时间:2023-11-30 01:48:41 24 4
gpt4 key购买 nike

我正在尝试从 android arsenal 添加一个 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

存储库位于:https://android-arsenal.com/details/1/264

最佳答案

在 Gragle 依赖行下方尝试

compile 'com.github.beworker:pinned-section-listview:1.1'

关于android - 从 android arsenal 添加存储库的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33347264/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com