[英]Cannot Resolve the github repository
嘗試使用jetpack.io中可用的存儲庫,也可以通過aar文件獲得該存儲庫,我嘗試添加模塊,但該模塊不起作用,現在我嘗試使用jetpack存儲庫添加它。 這是我的gradle文件
buildscript {
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
apply plugin: 'com.android.application'
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.github.QuadFlask:colorpicker:0.0.10'
}
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build- types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
當我試圖構建我的應用程序時,默認存儲庫位於https://github.com/QuadFlask/colorpicker ,它說無法解析com.github。 如圖所示:
嘗試將以下內容放入根(項目的)build.gradle文件(而不是模塊的內部版本)中
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.