【发布时间】:2021-07-30 16:29:50
【问题描述】:
我正在尝试构建一个依赖于 SimpleFingerGestures_Android_Library 的 Android 应用程序。应用程序的构建失败并出现以下错误 -
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
> Could not find com.github.championswimmer:SimpleFingerGestures_Android_Library:1.2.
Required by:
project
下面是我在 build.gradle(app) 中包含其依赖项的代码-
dependencies {
implementation 'com.github.championswimmer:SimpleFingerGestures_Android_Library:1.2'
}
我还添加了 maven 存储库 -
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
我的试用: 经过这么多的尝试后,我发现如果我使用对以前版本的库的依赖进行编译,则没有问题。所以下面的代码对我有用-
dependencies {
implementation 'com.github.championswimmer:SimpleFingerGestures_Android_Library:1.1'
}
问题摘要:我想包含最新版本的 SFG,即 1.2 ,但构建失败。然而,构建正在通过以前版本的 SFG Lib 1.1。
注意:我没有使用 AndroidStudio 进行构建,而是使用命令行 gradlew 实用程序(因为其他代码依赖项)。但是我尝试过使用 Android Studio 也有同样的问题。
【问题讨论】:
标签: android build build.gradle android-build