新建了一个项目,implementation 'com.github.hegaojian:JetpackMvvm:1.2.7' ,编译的时候报错,报错信息如下:
What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.hegaojian:JetpackMvvm:1.2.7.
Searched in the following locations:- https://dl.google.com/dl/android/maven2/com/github/hegaojian/JetpackMvvm/1.2.7/JetpackMvvm-1.2.7.pom - https://repo.maven.apache.org/maven2/com/github/hegaojian/JetpackMvvm/1.2.7/JetpackMvvm-1.2.7.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.
maven { url "https://jitpack.io" }
是要写在allprojects下面的
你是否完成了第一步, 以及检查第二步是否有拼写错误
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
...
implementation 'com.github.hegaojian:JetpackMvvm:1.2.7'
}
如有问题及时沟通
com.github.hegaojian:JetpackMvvm:1.2.7
这个库文件应该没有传到gradle的官网服务器上,建议自己把jar下载下来后,拷贝到app的lib目录下