Getting Platform declaration clash when using Interface in kotlin

Viewed 11135

I'm converting some classes in Java to kotlin and I'm running into compile errors when trying to inherit from an interface:

Platform declaration clash: The following declarations have the same JVM signature (getContentID()Ljava/lang/String;):

public open fun get-content-id (): String? public open fun getContentId(): String?

Here is the interface:

interface Media {
  val contentId: String

  val displayRunTime: String

  val genres: List<String>

  val programId: String

  val runTime: String

  val type: String
}

here is the class:

class Airing : Media {
  override val contentId: String? = null
  override val displayRunTime: String? = null
  override val genres: List<String>? = null
  override val programId: String? = null
  override val runTime: String? = null
  override val type: String? = null

  override fun getContentId(): String? {
    return contentId
  }

I'm super new to kotlin.

3 Answers
Related