Android-MQTT-Demo icon indicating copy to clipboard operation
Android-MQTT-Demo copied to clipboard

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

Open Rohitsachdeva opened this issue 4 years ago • 5 comments

this error is coming when user trying to connect with MqttAndroidClient

        IMqttToken token = client.connect();

Rohitsachdeva avatar Nov 27 '20 17:11 Rohitsachdeva

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

gaikwadChetan93 avatar Nov 28 '20 12:11 gaikwadChetan93

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

android.enableJetifier=true

sunilitechnotion avatar Mar 09 '22 06:03 sunilitechnotion

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

android.enableJetifier=true

Keith-Brian avatar Jun 20 '23 10:06 Keith-Brian

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

Rohitsachdeva avatar Jun 24 '23 23:06 Rohitsachdeva

android.enableJetifier=true works, thanks.

wycliff avatar Oct 13 '23 06:10 wycliff