Synthetic not available in new KMM example project


I’m trying to use the new KMM example project , but it seems that is impossible to import textView with Synthetic

Is this available on kmm?


1 Like

Hi Francesco, welcome to the Kotlin forum!

May you please explain in details what Syntetic means in your case?

Hi Alex,

the import of is not working. Unresolved reference: synthetic… for example:
so I can’t bind the view and I must use findViewById(). is kotlin android extensions not working in the example project?


1 Like

@alex.anisimov any news about that?

Hi @francescogatto,
Sorry for us making you wait so long we had needed time to understand the problem to the full.

Synthetic type of extension have not been adopted to KMM so they might be not robust enough while used with KMM. We recommend to use View Binding extensions instead, they are fully supported by KMM

1 Like

Thanks @alex.anisimov,

I hope it would be supported soon, because is necessary for existing projects that would be move to KMM

Any idea when its going to be available?

Why it seems so hard to include in the next release?? Also I found a work around but not sure if it applicable at this point.

Add this code in .iml file

<facet type="kotlin-language" name="Kotlin">
  <configuration version="3" platform="JVM 1.8" allPlatforms="JVM [1.8]" useProjectSettings="false">
    <compilerSettings />
      <option name="jvmTarget" value="1.8" />
      <option name="pluginOptions">
          <option value="" />
          <option value="" />

Is there any plan to implement synthetic in KMM in the next time?

This problem occurs through kotlin.mpp.enableGranularSourceSetsMetadata=true . See

If I set it to false then it works perfectly.

I think you had better use View Binding library instead of Synthetic. It’s safer and be suggested by Google.