Hi, Does anybody know why I am getting this error:...
# android
p
Hi, Does anybody know why I am getting this error:
Unable to instantiate receiver com.example.MyBroadCastReceiver: java.lang.ClassCastException: com.example.context.MyContextWrapper cannot be cast to android.app.ContextImpl.
In My Application:
Copy code
override fun attachBaseContext(base: Context) {
    val wrappedContext = MyContextWrapper.wrap(base)
    super.attachBaseContext(wrappedContext)
}
Where MyContextWrapper is just a Context Wrapper TIA
not kotlin but kotlin colored 2
c
Image from iOS.jpg
1