无法解决依赖关系conciseclock
其实,它的工作,但我不明白,我得到一个错误。我该如何解决它?无法解决依赖关系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
容易有没有这方面的库依赖性
com.github.zurnacibatuhan:conciseclock:0-SNAPSHOT
或者我建议检查库版本,所以没有数字版本
0-SNAPSHOT
或与该行替换
compile 'com.tomduan.conciseclock:library:0.2.2'
如果我使用这个链接,我不能从我的分岔项目获取代码。所以,我在这个GitHub库中做了一个fork,我发现了一个网站,它提供了一个链接来达到这些代码。这就是我使用这个链接的原因。如果我改变它,我无法使用它。我怎样才能解决这个问题? – Lewis
尝试下载项目并将其作为新模块插入,然后您可以使用项目查看此链接https://github.com/MagicMicky/FreemiumLibrary/wiki/Import-the-library-in-Android-Studio –
你正在使用25.3.1
版本在你的dependencies.it意味着你应该首先DD这对你的项目gradle这个库这样
allprojects {
repositories {
jcenter()
maven{ url 'https://dl.bintray.com/spark/maven' }
maven { url "https://jitpack.io" }
maven {url "https://maven.google.com"}
}
附加线
后maven {url " https://maven.google.com "}
则应更换这行:这一行
compile 'com.github.zurnacibatuhan:conciseclock:0-SNAPSHOT'
:
compile 'com.tomduan.conciseclock:library:0.2.2'
我不记得清楚,但我不得不岔开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