From 7ee601ab1eb23082ba8b308d85d4e446b674de10 Mon Sep 17 00:00:00 2001 From: biaji <2725285+biaji@users.noreply.github.com> Date: Thu, 2 Mar 2023 13:39:49 +0800 Subject: [PATCH] Update build.gradle Use 1.2.1 instead to avoid following error: MqttConnectOptions.setUserName in 1.2.0 has a null/empty check: ``` public void setUserName(String userName) { if ((userName != null) && (userName.trim().equals(""))) { throw new IllegalArgumentException(); } this.userName = userName; } ``` while the connect method in MqttClient will give "" as default value for username. And result to an IllegalArgumentException --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index d2e3f0b..dcea6d3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -54,7 +54,7 @@ repositories { dependencies { implementation "com.facebook.react:react-native:${safeExtGet('reactnativeVersion', '+')}" - implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0' + implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.1' implementation group: 'com.heroku.sdk', name: 'env-keystore', version: '1.0.4' }