【发布时间】:2017-01-17 14:06:52
【问题描述】:
我想将 this 存储库添加到我的 Android Studio 项目中,我尝试了多个依赖项,但它不起作用。有什么帮助吗,伙计们?
我的 build.gradle (app) 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 21
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'])
compile 'com.android.support:support-v4:24+'
compile 'com.7heaven.widgets:segmentcontrol:1.16'
compile 'at.bookworm:segcontrol:1' //THIS GUY IS MY PROBLEM
}
我的 build.gradle (app) 文件:
buildscript {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
【问题讨论】:
-
我在 jcenter 中找不到这个项目。
-
你试过编译'com.github.bookwormat:segcontrol:master-SNAPSHOT'吗?如果没有,为什么要包含 jitpack 存储库?
标签: java android android-studio github import