We are trying implement LocalBroadcastManager in our Android app but facing "Cannot resolve" error.
This is the object we need - https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager
Included the library in app build.gradle (as stated in that page)
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:localbroadcastmanager:28.0.0'
Included Maven in Solution build.gradle
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
}
Gradle version is 5.4.1
Below line throws "Cannot resolve symbol" error
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
Please let me know what we might be missing. Appreciate your help.