0xsegfault
0xsegfault

Reputation: 3161

Unresolved reference: jvmName

I am trying to build a kotlin file with gradle in terminal.

I am getting this error:

 Unresolved reference: jvmName

Here is a copy of the line from the code:

val outputContract = IOUContract::class.jvmName

Syntax seems fines. Would appreciate it if someone could give pointers on this

Upvotes: 1

Views: 1318

Answers (2)

Joel
Joel

Reputation: 23140

You need to add the following line: import kotlin.reflect.jvm.jvmName.

Upvotes: 2

Kiskae
Kiskae

Reputation: 25573

KClass<*>.jvmName belongs to the kotlin-reflect library, you probably don't have it included as a dependency.

Upvotes: 3

Related Questions