How to access "Application" from within kotlin module?

Please provide the following:

  1. SDK Version: 46
  2. Platforms(Android/iOS/web/all): Android

Hey guys, I am working within new expo module using kotlin and I need to access application from within Function(). I tried

appContext.currentActivity!!.application

But this results in following console errors

Cannot access ‘androidx.appcompat.app.ActionBarDrawerToggle.DelegateProvider’ which is a supertype of ‘androidx.appcompat.app.AppCompatActivity’. Check your module classpath for missing or conflicting dependencies

Cannot access ‘androidx.appcompat.app.AppCompatCallback’ which is a supertype of ‘androidx.appcompat.app.AppCompatActivity’. Check your module classpath for missing or conflicting dependencies

Would appreciate any help here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.