0

I have a class A where my view fragment_my_quests is defined. Synthetic imports works fine in class A. Now I extend B with A and try to use Synthetic import and id's inside my child class B. It shows red (compilation error). But when I run the app, it works fine. Just the compiler is not able to understand this. I am attaching screenshots for the reference.

Koltlin version : 1.3.20 Anko version : 0.10.8 Gradle version : 3.3.0

This is the screenshot for parent class. Synthetic imports works fine and do not show any compilation error. enter image description here

This is the screenshot for child class. Synthetic imports and the id's used in child class shows red.

enter image description here

Harsh
  • 599
  • 3
  • 20

1 Answers1

0

Try as follows

  • Menu > File > Invalidate Caches / Restart
  • Build -> Clean Project
  • Tools -> Android -> Sync Project with Gradle Files

If not work then delete the ./gradle directory and import your project again try above 3 steps.

Farid Haq
  • 3,728
  • 1
  • 21
  • 15