10

Is it mandatory to add @AndroidEntryPoint annotation on all dependent classes like fragment dependent upon activity. Is there any alternative solution for overcome this exception?

M.Muzammil
  • 643
  • 9
  • 18

1 Answers1

20

Just add @AndroidEntryPoint to your parent Activity class:

enter image description here

And yes, it's a mandatory process if you want to use Hilt. You could use Dagger to get away with this.

Jim
  • 1,027
  • 1
  • 10
  • 19