【问题标题】:issue to add a repository from android arsenal从 android 兵工厂添加存储库的问题
【发布时间】: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

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

【问题讨论】:

    标签: android android-studio gradle dependencies


    【解决方案1】:

    在 Gragle 依赖行下面试试

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多