jitpack.io ERROR: No build artifacts found
The foreword is solved
preface
Before, Android studio has been used to develop open source libraries and put them into jitpack Compile and package on Io. Recently, due to the research on the kotlin multiplatform of JetBrains, it is changed to develop an independent JVM library or multiplatform Library in idea. The multiplatform library is placed in jitpack There are bound to be problems with IO, because jitpack There are only JVM environments on Io. However, when the JVM library is put on, there are compilation success and packaging errors, error: no build artifacts found
Solution:
This is actually due to the fact that the com.android.libraryplugin
is included when developing the library in Android studio, and artifacts are generated. But there is no need to put the com.android.libraryplugin
in when making the jvm library ;
So we need to add artifacts
manually.
Modify build Gradle file
groovy:
publishing {
publications {
// This mavenJava can be filled in randomly, it's just a task name
// MavenPublication must have, this is the task class to call
mavenJava(MavenPublication) {
// The header here is the artifacts configuration information, do not fill in the default
groupId = 'org.gradle.sample'
artifactId = 'library'
version = '1.1'
from components.java
}
}
}
If it is build gradle.kts file
kotlin:
publishing {
publications {
create("maven_public", MavenPublication::class) {
groupId = "org.gradle.sample"
artifactId = "library"
version = "1.1"
from(components.getByName("java"))
}
}
}
Finish
Read More:
- Flutter android studio runs gradle build error: Could not resolve all artifacts for configuration’:classpath’.
- Error: Unable to build IHost No DbContext named ‘PersistedGrantDbContext‘ was found.
- [Solved] K8s cluster build error: error: kubectl get csr No resources found.
- JSP error: The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.
- [Solved] Bringing up interface eth0: Error: No suitable device found: no device found for connection ‘System eth0’.
- [Solved] Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no furthe
- [Solved] Vue.js error: Module build failed: Error: No parser and no file path given, couldn’t infer a parser.
- Gradle Package Project Lombok Not Working: No serializer found for class com.qbb.User and no properties discovered to create BeanSerializer……
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- Jenkins uses NPM to build Vue error, and the manual build is normal
- log4j:WARN No appenders could be found for logger (freemarker.cache)
- [Solved] Flutter Error: No MediaQuery widget ancestor found.
- No repositories directory found inside registry_ DATA_ DIR
- Visual Studio SignTool Error: No certificates were found that met all the given criteria.
- [Solved] Junit.test use error: log4j:WARN No appenders could be found for logger
- JMeter JDBC Error: No pool found named: ‘test‘ [How to Solve]
- [Solved] No corresponding flash error is found during MDK download
- [Solved] no identity found – Command CodeSign failed with a nonzero exit code
- [Solved] Unity Package Error: FAILURE: Build failed with an exception.