Issue:
In earlier versions of Vivox, initialization errors on Android-based devices can occur when using ProGuard obfuscation. In the specific range of versions with this issue, the initialization process may fail unless additional ProGuard exceptions are provided, due to a change in internal libraries used by the Vivox SDK.
Environment:
Projects using R8/ProGuard and built using the Vivox SDK for Android, including those targeting Android-based platforms like Meta Quest. This issue affects the following Vivox versions:
- Vivox Unity 16.x:
16.5.0or later, until16.6.0. - Vivox Unreal:
5.25.0.unr.0or later, until5.26.0.unr.0. - Vivox Core C++:
5.25.0or later, until5.26.0. - Vivox Unity 15.x (legacy):
15.1.250000-pre.1or later. No version with a fix has been released.
Cause:
In certain released versions of Vivox (see Environment above), a change to one of the internal libraries used by the SDK introduced a conflict with ProGuard's obfuscation process. Without specific exceptions for the com.unity.httplib.jni namespace, ProGuard can inadvertently modify code required for proper initialization, leading to runtime errors.
Resolution:
The Vivox release on April 3, 2025, added Proguard rules to Vivox AAR libraries, fixing this issue. Vivox library versions equal to or higher than those listed below will load these rules automatically:
- Vivox Unity 16.x:
16.6.0 - Vivox Unreal:
5.26.0.unr.0 - Vivox Core C++:
5.26.0
Please update if you're facing this issue. If you are using Vivox Unity 15.x or can't update to the latest version for whatever reason, this issue can be circumvented by adding the following rules to your ProGuard configuration file:
-keep class com.unity.httplib.jni.** { *; }
-dontwarn com.unity.httplib.jni.**These rules prevent ProGuard from obfuscating the necessary classes within the com.unity.httplib.jni namespace, ensuring correct Vivox initialization.
More information:
- These ProGuard rules are required in addition to any existing rules you might have for
com.vivox.sdk.jni.**. Both sets of rules are essential for proper Vivox functionality when using ProGuard. - If you are still experiencing initialization issues after implementing these rules, please double check the syntax and placement of your rules within your ProGuard file. Incorrectly placed or formatted rules may still lead to problems. If problems persist, please contact Unity support for further assistance, providing details about your Vivox SDK version, build environment, and the complete ProGuard configuration file.