Stack Exchange
Can not resolve import LocalBroadcastManager on statement android.support.v4.content.LocalBroadcastManager;
I got this error while importing an eclipse project to Android studio. It shows a suggestion Add library Gradle: com.android.support:support-core-utils-27.1.1 to classpath. I have added the library in my build.gradle file.
Here is my gradle file.
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "28.0.0"

defaultConfig {
    applicationId "com.example.tracking"
    minSdkVersion 17
    targetSdkVersion 27
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

allprojects {
repositories {
    google()

}
}

dependencies {


implementation project(':asciiProtocol')
implementation project(':deviceList')
implementation project(':captureActivity')
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.android.support:support-core-utils:27.1.1"
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation files('libs/opencsv-2.3.jar')
implementation files('libs/rfid.reader.api.jar')
implementation files('libs/scannercontrol.jar')
implementation files('libs/Zebra.jar')

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.1.1'
            }
        }
    }
}
}

I googled it but I could not find a proper solution for this. However, I tried the solution from this that isn't the right solution. Any help is appreciated?

Did you try to Clean Project and then Make Project in android studio's Build tab?

I faced the same problem, then I noticed Google divided the v4 support library to multiple packages.

Note: Prior to Support Library revision 24.2.0, there was a single v4 support library. That library was divided into multiple modules to improve efficiency. For backwards compatibility, if you list support-v4 in your Gradle script, your APK will include all of the v4 modules. However, to reduce APK size, we recommend that you just list the specific modules your app needs.

https://developer.android.com/topic/libraries/support-library/packages#v4
Then I checked LocalBroadcast page. 
https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager
At the page top, there is description 

belongs to Maven artifact com.android.support:localbroadcastmanager:28.0.0-alpha1

When I faced this problem, the v28.0.0 (not alpha) has been available.
In the end, I changed settings in my build.gradle.
before
implementation 'com.android.support:support-v4:28.0.0'

after
implementation 'com.android.support:localbroadcastmanager:28.0.0'

AndroidX 
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'


For androidx you can use: implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'

you can now replace implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' with the new: implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' & 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'

This happened to me while migrating for AndroidX and the solution was to replace "import androidx.core.content.LocalBroadcastManager;" with import androidx.localbroadcastmanager.content.LocalBroadcastManager;
Edited, as required to include the implementation, please don't forget dependency: 
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'

Noting that Target & Build version are:
compileSdkVersion 29
buildToolsVersion '29.0.2'


As called out by Dennis in another answer, make sure you include the dependency too:
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'

This solution worked great at SDK version 28 but in SDK version 29  this doesn't solve problem.

the solution is working for : '    compileSdkVersion 29
buildToolsVersion '29.0.2'
'

Use this
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
instead of
import androidx.core.content.LocalBroadcastManager;

For newer Android version, you should try to add this to gradle.properties
android.enableJetifier=true

and then add this dependency to build.gradle
implementation 'androidx.legacy:legacy-support-v4:1.0.0'


the dependency is correct but no need for android.enableJetifier=true

After lot of searching and R&D i found some solution. This is working for me i hope this is helping you.
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'

