47degrees / helios

A purely functional JSON library for Kotlin built on Λrrow
https://47degrees.github.io/helios/
Apache License 2.0
169 stars 22 forks source link

java.lang.NoSuchMethodError while generating decoders #116

Closed jachenry closed 5 years ago

jachenry commented 5 years ago

I'm hitting the following error while generating decoders

[kapt] An exception occurred: java.lang.NoSuchMethodError: helios.meta.compiler.json.JsonElement.getPairs()Ljava/util/List;

I'm using helios in androidTests with the following dependencies:

    androidTestImplementation "com.47deg:helios-core:0.2.0"
    kaptAndroidTest "com.47deg:helios-dsl-meta:0.2.0"
    androidTestImplementation "com.47deg:helios-integration-retrofit:0.2.0"
    kaptAndroidTest "com.47deg:helios-meta:0.2.0"
    androidTestImplementation "com.47deg:helios-optics:0.2.0"
    androidTestImplementation "com.47deg:helios-parser:0.2.0"

And the data class I'm trying to generate a decoder for is:

@Serializable
@JsonClass(generateAdapter = true)
@json
data class CodeGeneratedNetworkResponse(
    val users: List<NetworkUser>,
    val status: String? = null,
    @SerialName("is_real_json")
    @Json(name = "is_real_json")
    val isRealJson: Boolean = false
) {
    companion object
}
AdrianRaFo commented 5 years ago

What JDK are you using? Depending on the Android version you could be using the JDK 8 but for compatibility reasons we use the JDK 7

jachenry commented 5 years ago

@AdrianRaFo My colleague and I tried switching JDK's and still hit the same issues. I'll close for now because it appears to be specific to our project.