Build fails as java-library for Android
Closed this issue · 4 comments
I am using this library in an android project. The project is splitted between several librarys, one of them uses "joda-time-android".
I am getting a build error since version 2.10.9.1.
--- The Error ---
Could not resolve androidx.startup:startup-runtime:1.0.0.
Required by:
project : > net.danlew:android.joda:2.10.9.1
No matching variant of androidx.startup:startup-runtime:1.0.0 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, and its dependencies declared externally but:
- Variant 'releaseApiPublication' capability androidx.startup:startup-runtime:1.0.0 declares an API of a library, and its dependencies declared externally:
- Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
- Other compatible attribute:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Variant 'releaseRuntimePublication' capability androidx.startup:startup-runtime:1.0.0 declares a runtime of a library, and its dependencies declared externally:
- Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
- Other compatible attribute:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Variant 'sourcesElements' capability androidx.startup:startup-runtime:1.0.0 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them preferably in the form of class files)
--- End of the error ---
Do you have transitive = false
set on your inclusion of joda-time-android?
This could be a duplicate of #277.
Hi, no that's not the problem, this is how the dependencies section looks like:
dependencies {
implementation ('net.danlew:android.joda:2.10.9.1')
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.13'
testImplementation "org.mockito:mockito-core:3.3.1"
testImplementation 'joda-time:joda-time:2.10.9'
implementation project(path: ':LA_astronomyLib')
implementation project(path: ':common')
}
Ah - perhaps it's that you aren't including google()
maven repository? E.g.:
buildscript {
repositories {
mavenCentral()
google()
}
}
Closing this due to lack of follow-up.