我试图在Android中添加Neumorphism和DayNightSwitch依赖,但每次构建都失败。
我试了很多次,但还是没有找到问题所在。
gradle插件是7.2,gradle版本是7.0.1
Neumorphism依赖
dependencies {
implementation 'com.github.fornewid:neumorphism:{latest_version}'
}
DayNightSwitch依赖
dependencies {
implementation 'com.github.Mahfa:DayNightSwitch:1.4'
}
8: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.github.fornewid:neumorphism:0.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/fornewid/neumorphism/0.3.0/neumorphism-0.3.0.pom
- https://repo.maven.apache.org/maven2/com/github/fornewid/neumorphism/0.3.0/neumorphism-0.3.0.pom
Required by:
project :app
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
请尝试为依赖项指定一个版本
implementation 'com.github.fornewid:neumorphism:0.3.0'
请在你的应用级构建中添加新形态依赖。gradle如下,:
implementation 'com.github.fornewid:neumorphism:0.3.0'
并将dependencyResolutionManagement中的这些行添加到Settings.gradle:
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
jcenter() // Warning: this repository is going to shut down soon
}