其實,它的工作,但我不明白,我得到一個錯誤。我該如何解決它?無法解決依賴關係conciseclock
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.example"
minSdkVersion 18
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.:conciseclock:0-SNAPSHOT'
testCompile 'junit:junit:4.12'
}
和
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
maven{ url 'https://dl.bintray.com/spark/maven' }
maven { url "https://jitpack.io" }
mavenCentral()
}
}
task customClean(type: Delete) {
delete rootProject.buildDir
}
Error:A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not find com.:conciseclock:0-SNAPSHOT. Required by: project :app
Error(37,13) Failed to resolve: com.:conciseclock:0-SNAPSHOT
我不記得清楚,但我不得不岔開Gi tHub項目。在我按照需要更改了一些代碼之後,我從一個網站獲得了該鏈接以運行android項目的庫。這是一個問題嗎?我如何在項目上運行分叉的庫? – Lewis
@Lewis我認爲再次訪問該網站並再次獲取鏈接會更好。但是,鏈接創建過程注意到一件事。應該有一些複選框或參數像'snapshot'或'release'。您使用SNAPSHOT的方式通常是人們使用它進行調試。永久使用你應該做發佈版本。 而對於自定義存儲庫,您應該有一些自定義存儲庫,它應該是'maven {url'https://dl.bintray.com/spark/maven'}'我想,只要檢查它是否是正確的url。發佈版本應該包含像'compile'com.github.zurnacibatuhan:conciseclock:0#version.code'' –
我的意思是這個網站是:https://jitpack.io/#zurnacibatuhan/conciseclock/-SNAPSHOT 當你按「查找」按鈕,有五個版本。我應該選擇哪一個? – Lewis