gaikwadChetan93/Android-MQTT-Demo

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager;

Opened this issue ยท 5 comments

this error is coming when user trying to connect with MqttAndroidClient

        IMqttToken token = client.connect();

@Rohitsachdeva Have you tried the updated code?
I have added support for AndroidX.

For AndroidX please add the below line in gradle.properties file

android.enableJetifier=true

If using android X, In the gradle.properties file add the following line of code

android.enableJetifier=true

Sorry, I think I replaced whole code, I have have updated all packages from paho

android.enableJetifier=true works, thanks.