如何解决Android/Jitpack:无法导入子模块
我正在尝试导入我正在创建的 android 库的子模块。子模块称为progressbar
https://jitpack.io/#SomeKoder/Essentials/0.1.0
https://github.com/SomeKoder/Essentials
dependencies {
implementation 'com.github.SomeKoder:Essentials:0.1.0'
}
我已经尝试过这个和许多其他变体,但都没有成功。
dependencies {
implementation 'com.github.SomeKoder.Essentials:progressbar:0.1.0'
}
有人可以帮我弄清楚我做错了什么吗? 提前致谢
解决方法
将此添加到模块 build.gradle 导致实际构建的工件:
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.somekoder.Essentials.progressbar'
artifactId = 'progressbar'
version = '0.1.4'
}
debug(MavenPublication) {
from components.debug
groupId = 'com.somekoder.Essentials.progressbar'
artifactId = 'progressbar-debug'
version = '0.1.4'
}
}
}
}
似乎您必须在要为其创建工件的每个模块中添加此代码的变体。然后通过 JitPack 导入工作正常。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。