在这部分我在 Kotlin 中遇到错误:
class GitHubRepoAdapter(
private val context: Context,
private val values: List<GithubRepo>
) : ArrayAdapter<GithubRepo>(
context,
R.layout.list_item,
values
)
private val context: Context
在日志中它说:
Error:(14, 25) Accidental override: The following declarations have the same JVM signature (getContext()Landroid/content/Context;): fun <get-context>(): Context fun getContext(): Context!
我无法看到导致问题的原因。